The whereNull() method in Laravel’s Eloquent ORM allows you to filter query results based on whether a specific column’s value is NULL. Here’s an example:…
Leave a CommentTag: Laravel
To connect a Laravel application to an Azure SQL Server database, you’ll need to configure the database connection settings in your Laravel application. Here’s a…
Leave a CommentIn this tutorial, you will learn how easy it is to get data between two dates from the database using Laravel’s whereBetween method. Let’s say…
Leave a CommentDownloading images and files from the URL is simple and easy with Laravel’s Illuminate\Support\Facades\Storage; class. We gonna use file_get_contents function to reads the entire file into…
Leave a CommentIn this tutorial, you will learn how to write text to the existing pdf file in your Laravel application. We gonna write a simple PHP…
2 CommentsLaravel has in-built increment() and decrement() functions to increase or decrease a value of the column, by 1 or with the given number. Below are…
Leave a CommentThis is useful for migrations when you can’t rollback. It can easily be run in artisan mode or you can create a console command. foreach(\DB::select(‘SHOW…
Leave a CommentCreate a controller called UploadController.php with the following code. Create a view file Create a file called upload.blade.php in the resources/views directory with the below…
Leave a CommentIn this post, I would like to show you the hidden and useful functions of Laravel’s Eloquent ORM to Increment and Decrement value of the…
Leave a CommentIn this post, I would like to show the different ways to get last inserted ID from the database table when working with Laravel PHP…
Leave a CommentGiving download option to the user is a pretty common requirement in today’s web apps for the variety of reasons. For example, if your application…
Leave a CommentHere I am gonna show you few artisan commands which will help you to clear different caches in your Laravel application. Clear Application Cache To…
2 CommentsYou can use laravel’s artisan command to check currently installed version of Laravel Framework Version of Laravel Issue below command from your terminal, make sure…
Leave a CommentLogin Throttling is also called rate limiting which is very useful to increase the security of the application by protecting login form. Basically the…
2 CommentsAlmost in all projects, we face this situation where we have a first name and last name in two different fields in the database table…
1 Comment