File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <?php
2+
3+ use Illuminate \Database \Migrations \Migration ;
4+ use Illuminate \Database \Schema \Blueprint ;
5+ use Illuminate \Support \Facades \Schema ;
6+
7+ return new class extends Migration {
8+ public function up (): void
9+ {
10+ Schema::create ('world_currencies ' , function (Blueprint $ table ) {
11+ $ table ->string ('id ' , 3 )->primary ();
12+ $ table ->string ('name ' );
13+ $ table ->string ('is_active ' );
14+ $ table ->timestamps ();
15+ $ table ->softDeletes ();
16+ });
17+ }
18+
19+ public function down (): void
20+ {
21+ Schema::dropIfExists ('world_currencies ' );
22+ }
23+ };
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Eclipse \World \Models ;
4+
5+ use Illuminate \Database \Eloquent \Model ;
6+ use Illuminate \Database \Eloquent \SoftDeletes ;
7+
8+ class Currency extends Model
9+ {
10+ use SoftDeletes;
11+
12+ protected $ table = 'world_currencies ' ;
13+
14+ protected $ keyType = 'string ' ;
15+
16+ public $ incrementing = false ;
17+
18+ protected $ fillable = [
19+ 'name ' ,
20+ 'is_active ' ,
21+ ];
22+ }
You can’t perform that action at this time.
0 commit comments