Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel model casts

<?php

namespace AppModels;

use IlluminateDatabaseEloquentModel;

class User extends Model
{
    /**
     * The attributes that should be cast.
     *
     * @var array
     */
    protected $casts = [
        'options' => 'array',
    ];
}
 
PREVIOUS NEXT
Tagged: #laravel #model #casts
ADD COMMENT
Topic
Name
9+5 =