Answers for "laravel fields to json"

1

convert json string to json object in laravel

$manage = json_decode($request->stdin, true);
 print_r($manage);
Posted by: Guest on October-27-2020
0

laravel eloquent json type

<?php
//Array & JSON Casting
namespace App;

use Illuminate\Database\Eloquent\Model;

class User extends Model
{
    /**
     * The attributes that should be cast.
     *
     * @var array
     */
    protected $casts = [
        'options' => 'array',
    ];
}
namespace App;

use Illuminate\Database\Eloquent\Model;

class User extends Model
{
    /**
     * The attributes that should be cast.
     *
     * @var array
     */
    protected $casts = [
        'options' => 'array',
    ];
}
Posted by: Guest on August-17-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language