How to create database schema (table) in Laravel?

后端 未结 5 1142
眼角桃花
眼角桃花 2021-02-09 07:53

I\'m new to Laravel.I\'m trying to create database in Laravel. I tried in console with:

Schema::create

5条回答
  •  迷失自我
    2021-02-09 08:18

    Database setup in Laravel

    • open .env file on root

    example :-

      DB_CONNECTION=mysql
      DB_HOST=127.0.0.1
      DB_PORT=3306
      DB_DATABASE=dbname
      DB_USERNAME=root
      DB_PASSWORD=password
    

    Now run command

      php artisan migrate:install
      php artisan make:migration users // for creating new table 
    

提交回复
热议问题