Answers for "blade transform array in json"

PHP
2

model json laravel accessor to convert to array

public function getBalanceAttribute($value)
{
    return json_decode($value);
}
Posted by: Guest on September-11-2021
1

convert php array to javascript json laravel

<script>
	var js_json_obt = @json($php_array ?? '');
</scritp>
Posted by: Guest on December-07-2020

Browse Popular Code Answers by Language