FORM DATA ENTRY INTO DATABASE

Posted 4 months ago by Arunava007

My Routes File:


    Route::post('/MRD1', ['as' => 'MRD1', 'uses' => '[email protected]_data']);

My Controller:

    
     public function save_data(Request $request)
        {
            $user = User::create($request->all());
            return redirect()->route('MRD');
        }

My User.php:


 class User extends Authenticatable
{
    use Notifiable;

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'username', 'company', 'contactnumber','mail','jenislayanan'
    ];

    /**
     * The attributes that should be hidden for arrays.
     *
     * @var array
     */
//    protected $hidden = [
//        'password', 'remember_token',
//    ];
    protected $table = 'users';
}


Still database entry is not happening. Displaying errors

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.