samedi 31 octobre 2015

Mass Assignment Expection with create and update methods

I have strange issue while using create or update methods on laravel tinker although i added $fillable array

table fields as follows

  1. id
  2. title
  3. body
  4. published_at
  5. timestamps

model as follows

    <?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Article extends Model
{
    protected $fillable = ['title','body'];
}

command line i typed

$article = App\Article::create(['title' => 'ready']);



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1M89LFk
via IFTTT

Aucun commentaire:

Enregistrer un commentaire