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 | | 2532 Viewer | Category : Laravel
READ MORE

    Full Text Search in Laravel 5 Example

    Full Text Search in Laravel 5 Example

    Open Post

    PHP - Input multiple tags with dynamic autocomplete example

    PHP - Input multiple tags with dynamic autocomplete example

    Open Post

    Laravel 5 - Google reCaptcha code and Validation example using anhskohbo/no-captcha package

    Laravel 5 - Google reCaptcha code and Validation example using anhskohbo/no-captcha package

    Open Post

    How to get keys name from array using array helper in PHP Laravel ?

    How to get keys name from array using array helper in PHP Laravel ?

    Open Post

    Bootstrap form validation example with demo using validator.js plugin

    Bootstrap form validation example with demo using validator.js plugin

    Open Post

    laravel 5.4 New Feature - Add eloquent whereKey method

    laravel 5.4 New Feature - Add eloquent whereKey method

    Open Post