When you first setup a laravel project, you might encounter this error 'could not be opened: failed to open stream: Permission denied' or 'PHP Fatal error: Uncaught UnexpectedValueException: The stream or file'.
In laravel you can define all kind of relationships between database tables on the model itself (as in laravel, model is representation of database table), so here's list of eloquent relationships that you can use in laravel model.
In laravel there are two ways to insert data/record, using DB table or using model, but i found a problem when inserting the data using DB table, the timestamp created_at and updated_at is showing '0000-00-00 00:00:00' as value.
In laravel usually you have created_at and updated_at field in your database table, these are timestamps() that you define in your laravel migration, the question is how to update the value of these timestamp specially the updated_at?
If you did not specify primary key in your model, laravel will assume the primary key of the table is 'id', so for example your primary key is not 'id', but let's say 'user_id' or 'employee_id' etc, how to define this in the model?
If you are just learning about laravel, meaning you are beginner of laravel, you probably want to know about how to do insert, update and delete record of a database table in laravel. If you are beginner this short tutorial is for you.