How to get Logged in user info in Laravel ?

If  do you want to get logged in user information in laravel, Laravel auth function provide login user information you need to call Auth::User() function which returns all the details of users and also want to check user login or not then use laravel Auth::check function which return true or false.



 How to create a record in Laravel using eloquent ?

To create a new record in the database using Laravel Eloquent, simply create a new model instance, set attributes on the model, then call the save method:  example code give below.

Using save function you can simple insert data in database with all details which passed in request parameters.

13 Comments

Add a Comment

Your email address will not be published. Required fields are marked *