How to disable Laravel default timestamp

If you want to disable Laravel default timestamp (created_at or updated_at), here are the tips. Disable globally: If you want to disable globally, you need to go to base model and define timestamp false as follows- public $timestamps = false;   Disable individually: In some cases, maybe you need to stop individually. In this case,…

Read more...

Laravel Vue-Resource pass parameter in Get Method

Here is the small trick that, how to pass a parameter in Get method for Laravel Vue-Resource. View the code on Gist.   So, here you need to use params attribute, that’s all.  

Read more...

How to start Laravel as a fresh

Are you new at Laravel? Do you have the same question that, how to start Laravel? I strongly believe that it’s normal to everyone, you, me, and other devs those are good at laravel.   So, I have few recommendations for newcomers at laravel. Today, I am sharing with you guys. A guidebook cannot be an…

Read more...

How to set laravel custom primary key

Imagine you have an id in your table called product_id that you want to be as a primary key instead of id. In this scenario, you can set your custom primary key in your model.   View the code on Gist. Now you are able to use product_id as a primary key of the Product model.

Read more...