-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from alibori/LARG-3-Add-option-to-create-multip…
…le-resources-at-once LARG-3 feat(command): Add option to generate multiple resources at once
- Loading branch information
Showing
6 changed files
with
68 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Alibori\LaravelApiResourceGenerator\App\Models; | ||
|
||
use Illuminate\Database\Eloquent\Factories\HasFactory; | ||
use Illuminate\Database\Eloquent\Model; | ||
|
||
class Post extends Model | ||
{ | ||
use HasFactory; | ||
|
||
protected $table = 'posts'; | ||
|
||
protected $fillable = [ | ||
'title', | ||
'created_at', | ||
'updated_at', | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<testsuites> | ||
<testsuite name="" tests="2" assertions="2" errors="0" warnings="0" failures="0" skipped="0" time="0.207782"> | ||
<testsuite name="P\Tests\Feature\Test" file="C:\laragon\www\custom-packages\laravel-api-resource-generator\vendor\pestphp\pest\src\Factories\TestCaseFactory.php(223) : eval()'d code" tests="2" assertions="2" errors="0" warnings="0" failures="0" skipped="0" time="0.207782"> | ||
<testcase name="it database users table has been created" assertions="1" time="0.103244"/> | ||
<testcase name="it can generate a resource" assertions="1" time="0.104538"/> | ||
<testsuite name="" tests="3" assertions="4" errors="0" warnings="0" failures="0" skipped="0" time="0.203934"> | ||
<testsuite name="P\Tests\Feature\Test" file="C:\laragon\www\custom-packages\laravel-api-resource-generator\vendor\pestphp\pest\src\Factories\TestCaseFactory.php(223) : eval()'d code" tests="3" assertions="4" errors="0" warnings="0" failures="0" skipped="0" time="0.203934"> | ||
<testcase name="it database users table has been created" assertions="1" time="0.096050"/> | ||
<testcase name="it can generate a resource" assertions="1" time="0.093684"/> | ||
<testcase name="it can generate a resource for multiple models" assertions="2" time="0.014201"/> | ||
</testsuite> | ||
</testsuite> | ||
</testsuites> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters