Showing posts with label info. Show all posts
Showing posts with label info. Show all posts

Laravel eloquent relationships


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.

How to add primary key to Laravel model?


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?

How to do raw query in Laravel


Besides the standard methods for database query that are available on laravel, you also have an option to do raw query, in this article i will show you how to do raw database query in laravel.

Laravel query builder example


Instead of hand coding SQL code on your application, you should try to use query builder in laravel, in this article i will show some of the query builder example, so you can learn them.

Mass assignment technique in Laravel


When you learn about laravel, you probably heard about mass assignment, what does it mean? what exactly is mass assignment? should you care about it?

Category

Category