AKZN Notes

Archives for My Lazy and Forgetful Mind

Tag: Laravel

Laravel Cheat Sheet

factory call using tinker PHP Artisan tinker App\Model\(model name)::factory()->count(5)->create(); databases php artisan db:seed –class=TestSeeder php artisan make:migration create_flights_table php artisan migrate:rollback –step=1 composer composer dump-autoload git git pull origin main API sanctum error CSRF token mismatch add this on .env SESSION_DOMAIN=localhost SANCTUM_STATEFUL_DOMAINS=localhost:8081 <–depend on your php conf

Deploy Laravel Project to Hosting or VPS

Deploy to CPanel Clone git to cpanel Taken from https://dashboard.webhostingmagic.com/knowledgebase/242/How-To-Clone-A-Private-Github-Repo-To-A-cPanel-Server.html Git private repository requires SSH access. So you must ensure that your hosting package has SSH enabled (customers on Web Hosting Magic need not worry as every hosting package comes with SSH access) and perform additional steps in order to successfully clone a privately-hosted remote […]