Nowadays, Laravel is known as the best PHP framework for building modern, full-stack web applications. Whether you are new to PHP or web frameworks or have years of experience, Laravel is a progressive framework that can grow with you. So in this article, I will share some amazing tips and tricks about laravel that can elevate your coding level and helps you in your coding journey.

In the Laravel 8.81 getOrPut method to Collections that simplifies the use-case where you want to either get an existing key or insert a value if it doesn't exist and return the value.

// Instead of this JobPost::where('company', 'laravel') ->where('job_type', 'full time') ->get(); // You can pass an array JobPost::where(['company' => 'laravel', 'job_type' => 'full time']) ->get(); Return the primary keys from the models collection
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners