Installing Laravel

  1. Install composer
  2. Type in cmd ” composer create-project laravel/laravel app_name “
  3. Go to app_name folder and type ” php artisan serve “
  4. Change DB name in .env file
  5. Open cmd and type the following commands

Laravel Admin and User Login & Registration

  1. composer require laravel/jetstream
  2. php artisan jetstream:install livewire
  3. npm install // nodejs is important
  4. npm run dev
  5. Changes in User Table > Go to database folder > migration folder > edit in users_table
  • $table->string(‘usertype’)->default(0); // default 0 means regular user, 1 means admin user

    6.php artisan migrate

***NOTE*** If you get error like failed to connection :

  • Run php artisan serve

***NOTE*** If login or registration page css not loading in laravel use the following

  • composer require laravel/ui
  • php artisan ui bootstrap –auth
  • npm install
  • npm run dev
  • npm run production

Leave a Comment