Recover Lost Laravel Migration Files From an Existing Database

While working on one of my client projects, I was shocked to see as there were no migration files in a Laravel project. They provided me the live database to work with and it was somehow okay for now but we all know what migration files do in Laravel. It was itching me and I started researching for generating the migration files by using our existing database. Here comes to the rescue, one of the packages by Bennett Treptow was just what I was looking for....

April 22, 2022 · 1 min · Me

How to send sms using Aakash sms in Nepal using Laravel

Laravel AakashSms The sachinkiranti/aakash-sms package provides easy access to the api of Nepali Sms Service Provider called AakashSms. Installation Installation is straightforward, setup is similar to every other Laravel Packages. 1. Install via Composer Begin by pulling in the package through Composer: 1 composer require sachinkiranti/aakash-sms 2. Define the Service Provider and alias Note: This package supports the new auto discovery features of Laravel >=5.5, so if you are working on a Laravel >=5....

April 29, 2022 · 2 min · Me

Laravel Nepal Rastra Bank Forex Api

Laravel NrbForexApi The sachinkiranti/nrb-forex-api package provides easy access to the forex rate fixed by Nepal Rastra Bank for different countries to Nepali Rupees(NPR). Installation Installation is straightforward, setup is similar to every other Laravel Packages. 1. Install via Composer Begin by pulling in the package through Composer: 1 composer require sachinkiranti/nrb-forex-api 2. Define the Service Provider and alias Note: This package supports the new auto discovery features of Laravel >=5....

April 27, 2022 · 2 min · Me

Laravel Useful Route Flags and Options

Laravel makes adding a new route a piece of cake 😎. To view all the routes we have been using php artisan route:list and this list becomes quite messy and hard to read as the route keeps growing. Some of the common options Using path and name options 1 2 3 php artisan route:list --path="login" php artisan route:list --name="login" –compact flag 1 php artisan route:list --compact This command shows only Method, URI and Action....

August 18, 2021 · 1 min · Me

When And How to Use Database Transactions in Laravel

Hello Artisan 😎 , Database transactions are often an overlooked feature, but Laravel makes it so effortless. One of the powerful ways to ensure data integrity is database transactions. Database transactions give a powerful ability to safely perform multiple database queries in a single transaction. If all queries run smoothly, then only it will commit otherwise it will roll back. For Example, we have an application where we create a user, assign a role to the created user, and add KYC (Know your customer)....

August 4, 2021 · 2 min · Me