Tag : MassAssignmentException


Fixed - MassAssignmentException in model.php laravel 5?

massassignmentexception is for the security purpose if laravel 5 function. When i did start Laravel 5 and first i did try to add user using "User::create(['name'=>'hd','password'=>'1w'])" then i found bellow error. I was thinking what was wrong, but after investigation i found it for our security purpose, because you have to add field name that you want to insert that way other Http script or hacker etc can't insert something elelse you need to add $fillable variable in your Model. So, let's see user model example. <strong>User.php</strong> <pre class="prettyprint lang-php"> namespace App; <br.....

By Hardik Savani | April 25, 2016 | | 1951 Viewer | Category : Laravel
READ MORE

    Bootstrap daterangepicker example code with demo using daterangepicker.js

    Bootstrap daterangepicker example code with demo using daterangepicker.js

    Open Post

    Laravel 5 database backup using Laravel Backup Package

    Laravel 5 database backup using Laravel Backup Package

    Open Post

    Laravel 5 - Multiple markers in google map using gmaps.js

    Laravel 5 - Multiple markers in google map using gmaps.js

    Open Post

    AngularJS - convert comma separated string to array example

    AngularJS - convert comma separated string to array example

    Open Post

    How to remove # from URL in AngularJS?

    How to remove # from URL in AngularJS?

    Open Post

    How to create Laravel Resource Controller example?

    How to create Laravel Resource Controller example?

    Open Post