上QQ阅读APP看书,第一时间看更新
Creating models
Let's get hands on:
- Open your Terminal window inside the chapter-01 folder, and type the following command:
php artisan make:model Band
After the command, you should see a success message in green, stating: Model created successfully.
- Go back to your code editor; inside the app folder, you will see the Band.php file, with the following code:
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Band extends Model
{
//
}