Mass Assignment: Guarding Attributes

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Flight extends Model
{
    /**
     * The attributes that aren't mass assignable.
     *
     * @var array
     */
    protected $guarded = ['price'];
}
/**
 * The attributes that aren't mass assignable.
 *
 * @var array
 */
protected $guarded = [];

guarded property

Should contain an array of attributes that you do not want to be mass assignable.

Mass Assignment: Guarding Attributes — Structure map

Clickable & Draggable!

Mass Assignment: Guarding Attributes — Related pages: