File tree 4 files changed +59
-1
lines changed
4 files changed +59
-1
lines changed 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
+ class {{ class }} extends Migration
8
+ {
9
+ /**
10
+ * Run the migrations.
11
+ *
12
+ * @return void
13
+ */
14
+ public function up()
15
+ {
16
+ Schema::create('{{ table }}', function (Blueprint $table) {
17
+ $table->id();
18
+ $table->timestamps();
19
+ $table->softDeletes();
20
+ });
21
+ }
22
+
23
+ /**
24
+ * Reverse the migrations.
25
+ *
26
+ * @return void
27
+ */
28
+ public function down()
29
+ {
30
+ Schema::dropIfExists('{{ table }}');
31
+ }
32
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace {{ namespace }};
4
+
5
+ use Illuminate\Database\Eloquent\Model;
6
+ use Illuminate\Database\Eloquent\SoftDeletes;
7
+ use Illuminate\Database\Eloquent\Factories\HasFactory;
8
+
9
+ class {{ class }} extends Model
10
+ {
11
+ use HasFactory, SoftDeletes;
12
+ }
Original file line number Diff line number Diff line change @@ -13,8 +13,18 @@ class {{ class }} extends TestCase
13
13
/** @test */
14
14
public function test_example()
15
15
{
16
- $response = $this->post(route('api.test. example'), []);
16
+ $response = $this->post(route('api.example'), []);
17
17
18
18
// $response->assertOk();
19
+
20
+ // $response->assertJson([
21
+ //
22
+ // ]);
23
+
24
+ // $response->assertJsonStructure([
25
+ // 'errors' => [
26
+ //
27
+ // ],
28
+ // ]);
19
29
}
20
30
}
Original file line number Diff line number Diff line change @@ -13,5 +13,9 @@ class {{ class }} extends TestCase
13
13
public function test_example()
14
14
{
15
15
$this->assertTrue(true);
16
+
17
+ // $this->assertDatabaseHas('example', [
18
+ //
19
+ // ]);
16
20
}
17
21
}
You can’t perform that action at this time.
0 commit comments