-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(L8): update resources to be compatible with L8 [WIP] (#32)
* feat(upgrade): add support for L8 * feat(upgrade): add support for L8 * feat(factories): update factory generator * Apply fixes from StyleCI (#31) * feat(routes): update routes generator * Apply fixes from StyleCI (#33) * feat(models): update models generator * Apply fixes from StyleCI (#34) * feat(seeds): update seeders generator * Apply fixes from StyleCI (#35) * feat(docs): update docs * Apply fixes from StyleCI (#36) * feat(config): update config seed path * fix: tests Co-authored-by: Tiago Sousa <[email protected]>
- Loading branch information
1 parent
62155f4
commit 965c4b7
Showing
13 changed files
with
149 additions
and
132 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,56 @@ | ||
{ | ||
"name": "tiagomichaelsousa/laravelresources", | ||
"description": "Laravel Resources is a speed-up development package that allows you to create a boilerplate for Laravel apps with a default API structure.", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "tiagomichaelsousa", | ||
"email": "[email protected]", | ||
"homepage": "https://github.com/tiagomichaelsousa", | ||
"role": "Developer" | ||
} | ||
], | ||
"homepage": "https://github.com/tiagomichaelsousa/laravelresources", | ||
"keywords": [ | ||
"Laravel", | ||
"LaravelResources", | ||
"laravelresources", | ||
"laravel-resources" | ||
], | ||
"require": { | ||
"illuminate/support": "^7.0|^8.0" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "^8.5|^9.0", | ||
"mockery/mockery": "^1.3.1", | ||
"orchestra/testbench": "^5.0|^6.0", | ||
"sempro/phpunit-pretty-print": "^1.0" | ||
}, | ||
"autoload": { | ||
"files": [ | ||
"src/Helpers/helpers.php" | ||
"name": "tiagomichaelsousa/laravelresources", | ||
"description": "Laravel Resources is a speed-up development package that allows you to create a boilerplate for Laravel apps with a default API structure.", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "tiagomichaelsousa", | ||
"email": "[email protected]", | ||
"homepage": "https://github.com/tiagomichaelsousa", | ||
"role": "Developer" | ||
} | ||
], | ||
"psr-4": { | ||
"tiagomichaelsousa\\LaravelResources\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"tiagomichaelsousa\\LaravelResources\\Tests\\": "tests" | ||
} | ||
}, | ||
"scripts": { | ||
"test": "vendor/bin/phpunit", | ||
"test-report": "vendor/bin/phpunit --coverage-html report" | ||
}, | ||
"extra": { | ||
"laravel": { | ||
"providers": [ | ||
"tiagomichaelsousa\\LaravelResources\\LaravelResourcesServiceProvider" | ||
], | ||
"aliases": { | ||
"LaravelResources": "tiagomichaelsousa\\LaravelResources\\Facades\\LaravelResources" | ||
} | ||
"homepage": "https://github.com/tiagomichaelsousa/laravelresources", | ||
"keywords": [ | ||
"Laravel", | ||
"LaravelResources", | ||
"laravelresources", | ||
"laravel-resources" | ||
], | ||
"require": { | ||
"illuminate/support": "^7.0|^8.0" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "^8.5|^9.0", | ||
"mockery/mockery": "^1.3.1", | ||
"orchestra/testbench": "^5.0|^6.0", | ||
"sempro/phpunit-pretty-print": "^1.0" | ||
}, | ||
"autoload": { | ||
"files": [ | ||
"src/Helpers/helpers.php" | ||
], | ||
"psr-4": { | ||
"tiagomichaelsousa\\LaravelResources\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"tiagomichaelsousa\\LaravelResources\\Tests\\": "tests" | ||
} | ||
}, | ||
"scripts": { | ||
"test": "vendor/bin/phpunit", | ||
"test-report": "vendor/bin/phpunit --coverage-html report" | ||
}, | ||
"extra": { | ||
"laravel": { | ||
"providers": [ | ||
"tiagomichaelsousa\\LaravelResources\\LaravelResourcesServiceProvider" | ||
], | ||
"aliases": { | ||
"LaravelResources": "tiagomichaelsousa\\LaravelResources\\Facades\\LaravelResources" | ||
} | ||
} | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -1,22 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit bootstrap="vendor/autoload.php" | ||
backupGlobals="false" | ||
backupStaticAttributes="false" | ||
colors="true" | ||
verbose="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
processIsolation="false" | ||
stopOnFailure="false"> | ||
<testsuites> | ||
<testsuite name="Laravel Resources Test Suite"> | ||
<directory>tests/</directory> | ||
</testsuite> | ||
</testsuites> | ||
<filter> | ||
<whitelist> | ||
<directory>src/</directory> | ||
</whitelist> | ||
</filter> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" backupStaticAttributes="false" colors="true" verbose="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"> | ||
<coverage> | ||
<include> | ||
<directory>src/</directory> | ||
</include> | ||
</coverage> | ||
<testsuites> | ||
<testsuite name="Laravel Resources Test Suite"> | ||
<directory>tests/</directory> | ||
</testsuite> | ||
</testsuites> | ||
</phpunit> |
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
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,23 +1,28 @@ | ||
<?php | ||
|
||
/** @var \Illuminate\Database\Eloquent\Factory $factory */ | ||
namespace Database\Factories; | ||
|
||
use {{MODEL_NAMESPACE}}\{{MODEL_NAME}}; | ||
use Faker\Generator as Faker; | ||
use Illuminate\Database\Eloquent\Factories\Factory; | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Model Factories | ||
|-------------------------------------------------------------------------- | ||
| | ||
| This directory should contain each of the model factory definitions for | ||
| your application. Factories provide a convenient way to generate new | ||
| model instances for testing / seeding your application's database. | ||
| | ||
*/ | ||
class {{CLASS_NAME}} extends Factory | ||
{ | ||
/** | ||
* The name of the factory's corresponding model. | ||
* | ||
* @var string | ||
*/ | ||
protected $model = {{MODEL_NAME}}::class; | ||
|
||
$factory->define({{MODEL_NAME}}::class, function (Faker $faker) { | ||
return [ | ||
'name' => $faker->name, | ||
]; | ||
}); | ||
/** | ||
* Define the model's default state. | ||
* | ||
* @return array | ||
*/ | ||
public function definition() | ||
{ | ||
return [ | ||
'name' => $this->faker->name, | ||
]; | ||
} | ||
} |
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
Oops, something went wrong.