Implicit fancy 404 json instead of ModelNotFoundException in laravel API

Updated: 23th April 2025
Tags: laravel

Export mysql database structure laravel command

Updated: 15th April 2025
Tags: laravel mysql

[Solved] Docker League\Flysystem\UnableToCreateDirectory Unable to create a directory at /var/www/storage/app/public/

Updated: 13th April 2025
Tags: laravel docker

[Solved] laravel 12 api routes create

Updated: 1th April 2025
Tags: laravel laravel12

Why I don't like soft delete

Updated: 15th September 2024
Tags: laravel programming database opinion

Move your app from one server to other without downtime (for reading)

Updated: 8th September 2024
Tags: ubuntu laravel

laravel eloquent create vs insert

Updated: 17th July 2024
Tags: laravel

How to restart supervisor laravel

Updated: 5th July 2024
Tags: laravel ubuntu supervisor

If you changed supervisor config, or add new program to it, you need to restart it.

sudo supervisorctl stop all
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl start "laravel-worker:*"

[Solved] SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry for key 'failed_jobs_uuid_unique'

Updated: 13th June 2024
Tags: php laravel

How to check my laravel version

Updated: 14th April 2024
Tags: laravel
php artisan about

It will show laravel version with bunch of other usefull information.

artisan about

[Solved] CSRF Token Mismatch Error from API Laravel Sanctum

Updated: 14th April 2024
Tags: php laravel sanctum

[Solved] Composer require / Generating optimized autoload files is very slow

Updated: 14th April 2024
Tags: php composer laravel windows10

Add the whole directory of your app to Windows Defender Exclusions. You can also move your projects in the project directory and add projects to exclusion.

If you want even more speed and have SSD, you can move that project to SSD and then add to Windows Defender exclusions.

Social metatags for vue app

Updated: 7th April 2024
Tags: vue nginx laravel

Laravel FormRequest handling checkbox

Updated: 7th March 2024
Tags: laravel

[Solved] file_put_contents(/bootstrap/cache/packages.php): failed to open stream: Permission denied

Updated: 17th February 2023
Tags: laravel php ubuntu

Laravel check produced SQL

Updated: 15th April 2021
Tags: laravel
DB::enableQueryLog(); // Enable query log
// use orm
dd(DB::getQueryLog()); // Show results of log

Laravel clear queue job code cache

Updated: 12th April 2021
Tags: php laravel

Laravel queue job is caching your job php code, so after updating job code you need to:

php artisan queue:restart

Laravel select random row from table

Updated: 22th December 2019
Tags: php laravel sql

Get random row from table in laravel 5.3+

$randomRow = DB::table('table')
            ->inRandomOrder()
            ->first();

Get random id from table in laravel 5.3+

$randomId = DB::table('table')
            ->inRandomOrder()
            ->value('id');

Increase laravel performance

Updated: 20th December 2019
Tags: php laravel

Update laravel/installer global

Updated: 20th December 2019
Tags: php composer laravel