Add migrations and seeders support

This commit is contained in:
2021-01-14 14:16:52 +03:00
parent d12744296a
commit cb1f3a6bb5
15 changed files with 196 additions and 311 deletions

View File

@@ -17,8 +17,6 @@ class HRCCommand extends Command
{
$this->signature = $this->signature . ' {source} {result} {--unn=}';
parent::__construct();
print_r($this->getApplication());
}
public function __get($get)

View File

@@ -5,6 +5,7 @@ namespace App\Console;
use App\Commands\HelloWorld;
use Illuminate\Console\Scheduling\Schedule;
use Laravel\Lumen\Console\Kernel as ConsoleKernel;
use App\Helpers\ClassHelper;
class Kernel extends ConsoleKernel
{
@@ -19,51 +20,14 @@ class Kernel extends ConsoleKernel
//
}
private function extractClass($file)
{
$fp = fopen($file, 'r');
$class = $namespace = $buffer = '';
$i = 0;
while (!$class) {
if (feof($fp)) break;
$buffer .= fread($fp, 512);
$tokens = token_get_all($buffer);
if (strpos($buffer, '{') === false) continue;
for (;$i<count($tokens);$i++) {
if ($tokens[$i][0] === T_NAMESPACE) {
for ($j=$i+1;$j<count($tokens); $j++) {
if ($tokens[$j][0] === T_STRING) {
$namespace .= '\\'.$tokens[$j][1];
} else if ($tokens[$j] === '{' || $tokens[$j] === ';') {
break;
}
}
}
if ($tokens[$i][0] === T_CLASS) {
for ($j=$i+1;$j<count($tokens);$j++) {
if ($tokens[$j] === '{') {
$class = $tokens[$i+2][1];
}
}
}
}
}
return $namespace . '\\' . $class;
}
public function getCommands()
{
$commands_path = base_path() . '/../commands';
$files = array_diff(scandir(base_path() . '/../commands'), array('.', '..'));
$files = array_diff(scandir($commands_path), array('.', '..'));
$classes = [];
foreach($files as $file) {
$classes[] = $this->extractClass($commands_path . '/' . $file);
$classes[] = ClassHelper::extract($commands_path . '/' . $file);
}
$commands = parent::getCommands();

View File

@@ -1,16 +0,0 @@
<?php
namespace App\Events;
class ExampleEvent extends Event
{
/**
* Create a new event instance.
*
* @return void
*/
public function __construct()
{
//
}
}

View File

@@ -0,0 +1,43 @@
<?php
namespace App\Helpers;
class ClassHelper
{
public static function extract($file)
{
$fp = fopen($file, 'r');
$class = $namespace = $buffer = '';
$i = 0;
while (!$class) {
if (feof($fp)) break;
$buffer .= fread($fp, 512);
$tokens = token_get_all($buffer);
if (strpos($buffer, '{') === false) continue;
for (; $i < count($tokens); $i++) {
if ($tokens[$i][0] === T_NAMESPACE) {
for ($j = $i + 1; $j < count($tokens); $j++) {
if ($tokens[$j][0] === T_STRING) {
$namespace .= '\\' . $tokens[$j][1];
} else if ($tokens[$j] === '{' || $tokens[$j] === ';') {
break;
}
}
}
if ($tokens[$i][0] === T_CLASS) {
for ($j = $i + 1; $j < count($tokens); $j++) {
if ($tokens[$j] === '{') {
$class = $tokens[$i + 2][1];
}
}
}
}
}
return $namespace . '\\' . $class;
}
}

View File

@@ -1,18 +0,0 @@
<?php
namespace App\Http\Controllers;
class ExampleController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
//
}
//
}

View File

@@ -1,20 +0,0 @@
<?php
namespace App\Http\Middleware;
use Closure;
class ExampleMiddleware
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
return $next($request);
}
}

View File

@@ -1,26 +0,0 @@
<?php
namespace App\Jobs;
class ExampleJob extends Job
{
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
//
}
}

View File

@@ -1,31 +0,0 @@
<?php
namespace App\Listeners;
use App\Events\ExampleEvent;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
class ExampleListener
{
/**
* Create the event listener.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Handle the event.
*
* @param \App\Events\ExampleEvent $event
* @return void
*/
public function handle(ExampleEvent $event)
{
//
}
}

View File

@@ -2,6 +2,7 @@
namespace App\Providers;
use Closure;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
@@ -15,4 +16,15 @@ class AppServiceProvider extends ServiceProvider
{
//
}
public function boot()
{
$migrations_path = base_path() . '/../database/migrations';
$default_path = database_path('migrations');
$this->loadMigrationsFrom([
$default_path,
$migrations_path
]);
}
}

View File

@@ -90,7 +90,7 @@ $app->configure('app');
|
*/
// $app->register(App\Providers\AppServiceProvider::class);
$app->register(App\Providers\AppServiceProvider::class);
// $app->register(App\Providers\AuthServiceProvider::class);
// $app->register(App\Providers\EventServiceProvider::class);
@@ -105,10 +105,4 @@ $app->configure('app');
|
*/
$app->router->group([
'namespace' => 'App\Http\Controllers',
], function ($router) {
require __DIR__.'/../routes/web.php';
});
return $app;

View File

@@ -21,10 +21,13 @@
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/",
"Database\\Factories\\": "../database/factories/",
"Database\\Seeders\\": "database/seeders",
"Database\\Component\\Seeders\\": "../database/seeders/",
"Database\\Migrations\\": "../database/migrations",
"App\\Commands\\": "../commands/",
"App\\Models\\": "../models/"
"App\\Models\\": "../models/",
"App\\Helpers\\": "app/Helpers/"
}
},
"autoload-dev": {

238
core/composer.lock generated
View File

@@ -244,16 +244,16 @@
},
{
"name": "egulias/email-validator",
"version": "2.1.24",
"version": "2.1.25",
"source": {
"type": "git",
"url": "https://github.com/egulias/EmailValidator.git",
"reference": "ca90a3291eee1538cd48ff25163240695bd95448"
"reference": "0dbf5d78455d4d6a41d186da50adc1122ec066f4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ca90a3291eee1538cd48ff25163240695bd95448",
"reference": "ca90a3291eee1538cd48ff25163240695bd95448",
"url": "https://api.github.com/repos/egulias/EmailValidator/zipball/0dbf5d78455d4d6a41d186da50adc1122ec066f4",
"reference": "0dbf5d78455d4d6a41d186da50adc1122ec066f4",
"shasum": ""
},
"require": {
@@ -298,7 +298,7 @@
"validation",
"validator"
],
"time": "2020-11-14T15:56:27+00:00"
"time": "2020-12-29T14:50:06+00:00"
},
{
"name": "graham-campbell/result-type",
@@ -354,7 +354,7 @@
},
{
"name": "illuminate/auth",
"version": "v8.19.0",
"version": "v8.22.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/auth.git",
@@ -407,7 +407,7 @@
},
{
"name": "illuminate/broadcasting",
"version": "v8.19.0",
"version": "v8.22.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/broadcasting.git",
@@ -459,16 +459,16 @@
},
{
"name": "illuminate/bus",
"version": "v8.19.0",
"version": "v8.22.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/bus.git",
"reference": "576ad07738e87190c263516d6895dc6d28ec7afe"
"reference": "b2c89db379a2d8b5c5eb1f81478b3c40f45d93ff"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/bus/zipball/576ad07738e87190c263516d6895dc6d28ec7afe",
"reference": "576ad07738e87190c263516d6895dc6d28ec7afe",
"url": "https://api.github.com/repos/illuminate/bus/zipball/b2c89db379a2d8b5c5eb1f81478b3c40f45d93ff",
"reference": "b2c89db379a2d8b5c5eb1f81478b3c40f45d93ff",
"shasum": ""
},
"require": {
@@ -504,20 +504,20 @@
],
"description": "The Illuminate Bus package.",
"homepage": "https://laravel.com",
"time": "2020-12-09T18:07:50+00:00"
"time": "2020-12-29T15:18:15+00:00"
},
{
"name": "illuminate/cache",
"version": "v8.19.0",
"version": "v8.22.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/cache.git",
"reference": "2b8ab6425929ac782a6255a1b729bff026249aba"
"reference": "35dcb2c593ce95c85456da7b3a13e36ff460f535"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/cache/zipball/2b8ab6425929ac782a6255a1b729bff026249aba",
"reference": "2b8ab6425929ac782a6255a1b729bff026249aba",
"url": "https://api.github.com/repos/illuminate/cache/zipball/35dcb2c593ce95c85456da7b3a13e36ff460f535",
"reference": "35dcb2c593ce95c85456da7b3a13e36ff460f535",
"shasum": ""
},
"require": {
@@ -557,20 +557,20 @@
],
"description": "The Illuminate Cache package.",
"homepage": "https://laravel.com",
"time": "2020-12-08T17:15:16+00:00"
"time": "2020-12-26T15:57:28+00:00"
},
{
"name": "illuminate/collections",
"version": "v8.19.0",
"version": "v8.22.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/collections.git",
"reference": "4647141880c193a0edaa91754004d8bc7471e56b"
"reference": "fa1f5a2809a777040ab1616527dc2e66f4ae93f4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/collections/zipball/4647141880c193a0edaa91754004d8bc7471e56b",
"reference": "4647141880c193a0edaa91754004d8bc7471e56b",
"url": "https://api.github.com/repos/illuminate/collections/zipball/fa1f5a2809a777040ab1616527dc2e66f4ae93f4",
"reference": "fa1f5a2809a777040ab1616527dc2e66f4ae93f4",
"shasum": ""
},
"require": {
@@ -607,11 +607,11 @@
],
"description": "The Illuminate Collections package.",
"homepage": "https://laravel.com",
"time": "2020-12-08T17:15:16+00:00"
"time": "2021-01-12T15:21:34+00:00"
},
{
"name": "illuminate/config",
"version": "v8.19.0",
"version": "v8.22.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/config.git",
@@ -655,7 +655,7 @@
},
{
"name": "illuminate/console",
"version": "v8.19.0",
"version": "v8.22.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/console.git",
@@ -711,7 +711,7 @@
},
{
"name": "illuminate/container",
"version": "v8.19.0",
"version": "v8.22.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/container.git",
@@ -758,16 +758,16 @@
},
{
"name": "illuminate/contracts",
"version": "v8.19.0",
"version": "v8.22.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/contracts.git",
"reference": "ecc0ae5e02efa49b50efac567f410911f75fd993"
"reference": "073109b521aec104f11c5cf5aded97aa0e63f313"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/contracts/zipball/ecc0ae5e02efa49b50efac567f410911f75fd993",
"reference": "ecc0ae5e02efa49b50efac567f410911f75fd993",
"url": "https://api.github.com/repos/illuminate/contracts/zipball/073109b521aec104f11c5cf5aded97aa0e63f313",
"reference": "073109b521aec104f11c5cf5aded97aa0e63f313",
"shasum": ""
},
"require": {
@@ -798,20 +798,20 @@
],
"description": "The Illuminate Contracts package.",
"homepage": "https://laravel.com",
"time": "2020-12-11T14:35:03+00:00"
"time": "2020-12-18T14:24:20+00:00"
},
{
"name": "illuminate/database",
"version": "v8.19.0",
"version": "v8.22.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/database.git",
"reference": "179b1b7188c9e2095c1d0b8ecf7b26237727ff96"
"reference": "4a2040c25d28315be005784a9ea4c2efb2a95a27"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/database/zipball/179b1b7188c9e2095c1d0b8ecf7b26237727ff96",
"reference": "179b1b7188c9e2095c1d0b8ecf7b26237727ff96",
"url": "https://api.github.com/repos/illuminate/database/zipball/4a2040c25d28315be005784a9ea4c2efb2a95a27",
"reference": "4a2040c25d28315be005784a9ea4c2efb2a95a27",
"shasum": ""
},
"require": {
@@ -862,11 +862,11 @@
"orm",
"sql"
],
"time": "2020-12-10T14:55:42+00:00"
"time": "2021-01-13T13:37:56+00:00"
},
{
"name": "illuminate/encryption",
"version": "v8.19.0",
"version": "v8.22.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/encryption.git",
@@ -913,7 +913,7 @@
},
{
"name": "illuminate/events",
"version": "v8.19.0",
"version": "v8.22.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/events.git",
@@ -964,7 +964,7 @@
},
{
"name": "illuminate/filesystem",
"version": "v8.19.0",
"version": "v8.22.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/filesystem.git",
@@ -1022,7 +1022,7 @@
},
{
"name": "illuminate/hashing",
"version": "v8.19.0",
"version": "v8.22.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/hashing.git",
@@ -1066,16 +1066,16 @@
},
{
"name": "illuminate/http",
"version": "v8.19.0",
"version": "v8.22.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/http.git",
"reference": "86afbb1ac9a73d7a5ffff32be285e2b11276bb5d"
"reference": "49b0fbe16708eeea63ce5f71e63ff6e6a695dfc0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/http/zipball/86afbb1ac9a73d7a5ffff32be285e2b11276bb5d",
"reference": "86afbb1ac9a73d7a5ffff32be285e2b11276bb5d",
"url": "https://api.github.com/repos/illuminate/http/zipball/49b0fbe16708eeea63ce5f71e63ff6e6a695dfc0",
"reference": "49b0fbe16708eeea63ce5f71e63ff6e6a695dfc0",
"shasum": ""
},
"require": {
@@ -1116,11 +1116,11 @@
],
"description": "The Illuminate Http package.",
"homepage": "https://laravel.com",
"time": "2020-12-08T17:15:16+00:00"
"time": "2021-01-05T16:41:31+00:00"
},
{
"name": "illuminate/log",
"version": "v8.19.0",
"version": "v8.22.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/log.git",
@@ -1165,7 +1165,7 @@
},
{
"name": "illuminate/macroable",
"version": "v8.19.0",
"version": "v8.22.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/macroable.git",
@@ -1207,7 +1207,7 @@
},
{
"name": "illuminate/pagination",
"version": "v8.19.0",
"version": "v8.22.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/pagination.git",
@@ -1253,7 +1253,7 @@
},
{
"name": "illuminate/pipeline",
"version": "v8.19.0",
"version": "v8.22.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/pipeline.git",
@@ -1297,16 +1297,16 @@
},
{
"name": "illuminate/queue",
"version": "v8.19.0",
"version": "v8.22.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/queue.git",
"reference": "5a417cdaa7edc2434fd374979dc2977ceccd4b27"
"reference": "59734ca07889b791a38f7182f396db2b6cf4bdd3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/queue/zipball/5a417cdaa7edc2434fd374979dc2977ceccd4b27",
"reference": "5a417cdaa7edc2434fd374979dc2977ceccd4b27",
"url": "https://api.github.com/repos/illuminate/queue/zipball/59734ca07889b791a38f7182f396db2b6cf4bdd3",
"reference": "59734ca07889b791a38f7182f396db2b6cf4bdd3",
"shasum": ""
},
"require": {
@@ -1354,11 +1354,11 @@
],
"description": "The Illuminate Queue package.",
"homepage": "https://laravel.com",
"time": "2020-12-11T14:34:10+00:00"
"time": "2021-01-08T14:07:38+00:00"
},
{
"name": "illuminate/session",
"version": "v8.19.0",
"version": "v8.22.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/session.git",
@@ -1410,16 +1410,16 @@
},
{
"name": "illuminate/support",
"version": "v8.19.0",
"version": "v8.22.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/support.git",
"reference": "91c965bddd834aaae650043c4726bedf00d033dd"
"reference": "6a516676a83d2a73c46eaf7907f730e86ef60da5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/support/zipball/91c965bddd834aaae650043c4726bedf00d033dd",
"reference": "91c965bddd834aaae650043c4726bedf00d033dd",
"url": "https://api.github.com/repos/illuminate/support/zipball/6a516676a83d2a73c46eaf7907f730e86ef60da5",
"reference": "6a516676a83d2a73c46eaf7907f730e86ef60da5",
"shasum": ""
},
"require": {
@@ -1469,20 +1469,20 @@
],
"description": "The Illuminate Support package.",
"homepage": "https://laravel.com",
"time": "2020-12-14T14:16:56+00:00"
"time": "2021-01-13T13:37:56+00:00"
},
{
"name": "illuminate/testing",
"version": "v8.19.0",
"version": "v8.22.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/testing.git",
"reference": "c8a48ed05f8f618dfa65ab04481345ad9d6bd1b1"
"reference": "b5bc45291b99ea810413a9da7319f0235b516353"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/testing/zipball/c8a48ed05f8f618dfa65ab04481345ad9d6bd1b1",
"reference": "c8a48ed05f8f618dfa65ab04481345ad9d6bd1b1",
"url": "https://api.github.com/repos/illuminate/testing/zipball/b5bc45291b99ea810413a9da7319f0235b516353",
"reference": "b5bc45291b99ea810413a9da7319f0235b516353",
"shasum": ""
},
"require": {
@@ -1522,11 +1522,11 @@
],
"description": "The Illuminate Testing package.",
"homepage": "https://laravel.com",
"time": "2020-11-29T20:22:49+00:00"
"time": "2021-01-07T16:57:53+00:00"
},
{
"name": "illuminate/translation",
"version": "v8.19.0",
"version": "v8.22.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/translation.git",
@@ -1574,16 +1574,16 @@
},
{
"name": "illuminate/validation",
"version": "v8.19.0",
"version": "v8.22.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/validation.git",
"reference": "1cd44552e92561bb4560a57b69824613dee64f1c"
"reference": "cfe8fb048e448ec0491d333913b90cc37598431d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/illuminate/validation/zipball/1cd44552e92561bb4560a57b69824613dee64f1c",
"reference": "1cd44552e92561bb4560a57b69824613dee64f1c",
"url": "https://api.github.com/repos/illuminate/validation/zipball/cfe8fb048e448ec0491d333913b90cc37598431d",
"reference": "cfe8fb048e448ec0491d333913b90cc37598431d",
"shasum": ""
},
"require": {
@@ -1625,11 +1625,11 @@
],
"description": "The Illuminate Validation package.",
"homepage": "https://laravel.com",
"time": "2020-12-08T17:15:16+00:00"
"time": "2021-01-13T13:37:56+00:00"
},
{
"name": "illuminate/view",
"version": "v8.19.0",
"version": "v8.22.1",
"source": {
"type": "git",
"url": "https://github.com/illuminate/view.git",
@@ -3061,16 +3061,16 @@
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.20.0",
"version": "v1.22.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41"
"reference": "c6c942b1ac76c82448322025e084cadc56048b4e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f4ba089a5b6366e453971d3aad5fe8e897b37f41",
"reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e",
"reference": "c6c942b1ac76c82448322025e084cadc56048b4e",
"shasum": ""
},
"require": {
@@ -3082,7 +3082,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.20-dev"
"dev-main": "1.22-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -3119,20 +3119,20 @@
"polyfill",
"portable"
],
"time": "2020-10-23T14:02:19+00:00"
"time": "2021-01-07T16:49:33+00:00"
},
{
"name": "symfony/polyfill-intl-grapheme",
"version": "v1.20.0",
"version": "v1.22.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-grapheme.git",
"reference": "c7cf3f858ec7d70b89559d6e6eb1f7c2517d479c"
"reference": "267a9adeb8ecb8071040a740930e077cdfb987af"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/c7cf3f858ec7d70b89559d6e6eb1f7c2517d479c",
"reference": "c7cf3f858ec7d70b89559d6e6eb1f7c2517d479c",
"url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/267a9adeb8ecb8071040a740930e077cdfb987af",
"reference": "267a9adeb8ecb8071040a740930e077cdfb987af",
"shasum": ""
},
"require": {
@@ -3144,7 +3144,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.20-dev"
"dev-main": "1.22-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -3183,20 +3183,20 @@
"portable",
"shim"
],
"time": "2020-10-23T14:02:19+00:00"
"time": "2021-01-07T16:49:33+00:00"
},
{
"name": "symfony/polyfill-intl-idn",
"version": "v1.20.0",
"version": "v1.22.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-idn.git",
"reference": "3b75acd829741c768bc8b1f84eb33265e7cc5117"
"reference": "0eb8293dbbcd6ef6bf81404c9ce7d95bcdf34f44"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/3b75acd829741c768bc8b1f84eb33265e7cc5117",
"reference": "3b75acd829741c768bc8b1f84eb33265e7cc5117",
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/0eb8293dbbcd6ef6bf81404c9ce7d95bcdf34f44",
"reference": "0eb8293dbbcd6ef6bf81404c9ce7d95bcdf34f44",
"shasum": ""
},
"require": {
@@ -3210,7 +3210,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.20-dev"
"dev-main": "1.22-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -3253,20 +3253,20 @@
"portable",
"shim"
],
"time": "2020-10-23T14:02:19+00:00"
"time": "2021-01-07T16:49:33+00:00"
},
{
"name": "symfony/polyfill-intl-normalizer",
"version": "v1.20.0",
"version": "v1.22.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-normalizer.git",
"reference": "727d1096295d807c309fb01a851577302394c897"
"reference": "6e971c891537eb617a00bb07a43d182a6915faba"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/727d1096295d807c309fb01a851577302394c897",
"reference": "727d1096295d807c309fb01a851577302394c897",
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/6e971c891537eb617a00bb07a43d182a6915faba",
"reference": "6e971c891537eb617a00bb07a43d182a6915faba",
"shasum": ""
},
"require": {
@@ -3278,7 +3278,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.20-dev"
"dev-main": "1.22-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -3320,20 +3320,20 @@
"portable",
"shim"
],
"time": "2020-10-23T14:02:19+00:00"
"time": "2021-01-07T17:09:11+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.20.0",
"version": "v1.22.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "39d483bdf39be819deabf04ec872eb0b2410b531"
"reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/39d483bdf39be819deabf04ec872eb0b2410b531",
"reference": "39d483bdf39be819deabf04ec872eb0b2410b531",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f377a3dd1fde44d37b9831d68dc8dea3ffd28e13",
"reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13",
"shasum": ""
},
"require": {
@@ -3345,7 +3345,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.20-dev"
"dev-main": "1.22-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -3383,20 +3383,20 @@
"portable",
"shim"
],
"time": "2020-10-23T14:02:19+00:00"
"time": "2021-01-07T16:49:33+00:00"
},
{
"name": "symfony/polyfill-php72",
"version": "v1.20.0",
"version": "v1.22.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php72.git",
"reference": "cede45fcdfabdd6043b3592e83678e42ec69e930"
"reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cede45fcdfabdd6043b3592e83678e42ec69e930",
"reference": "cede45fcdfabdd6043b3592e83678e42ec69e930",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9",
"reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9",
"shasum": ""
},
"require": {
@@ -3405,7 +3405,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.20-dev"
"dev-main": "1.22-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -3442,20 +3442,20 @@
"portable",
"shim"
],
"time": "2020-10-23T14:02:19+00:00"
"time": "2021-01-07T16:49:33+00:00"
},
{
"name": "symfony/polyfill-php73",
"version": "v1.20.0",
"version": "v1.22.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php73.git",
"reference": "8ff431c517be11c78c48a39a66d37431e26a6bed"
"reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/8ff431c517be11c78c48a39a66d37431e26a6bed",
"reference": "8ff431c517be11c78c48a39a66d37431e26a6bed",
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a678b42e92f86eca04b7fa4c0f6f19d097fb69e2",
"reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2",
"shasum": ""
},
"require": {
@@ -3464,7 +3464,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.20-dev"
"dev-main": "1.22-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -3504,20 +3504,20 @@
"portable",
"shim"
],
"time": "2020-10-23T14:02:19+00:00"
"time": "2021-01-07T16:49:33+00:00"
},
{
"name": "symfony/polyfill-php80",
"version": "v1.20.0",
"version": "v1.22.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
"reference": "e70aa8b064c5b72d3df2abd5ab1e90464ad009de"
"reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/e70aa8b064c5b72d3df2abd5ab1e90464ad009de",
"reference": "e70aa8b064c5b72d3df2abd5ab1e90464ad009de",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91",
"reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91",
"shasum": ""
},
"require": {
@@ -3526,7 +3526,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.20-dev"
"dev-main": "1.22-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -3570,7 +3570,7 @@
"portable",
"shim"
],
"time": "2020-10-23T14:02:19+00:00"
"time": "2021-01-07T16:49:33+00:00"
},
{
"name": "symfony/process",

View File

@@ -1,29 +0,0 @@
<?php
namespace Database\Factories;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
class UserFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = User::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
'name' => $this->faker->name,
'email' => $this->faker->unique()->safeEmail,
];
}
}

View File

@@ -2,6 +2,7 @@
namespace Database\Seeders;
use App\Helpers\ClassHelper;
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
@@ -13,6 +14,14 @@ class DatabaseSeeder extends Seeder
*/
public function run()
{
// $this->call('UsersTableSeeder');
$seeders_path = base_path() . '/../database/seeders';
if(file_exists($seeders_path)) {
$files = array_diff(scandir($seeders_path), array('.', '..'));
foreach ($files as $file) {
$this->call(ClassHelper::extract($seeders_path . '/' . $file));
}
}
}
}

View File

@@ -1,5 +1,7 @@
<?php
namespace Database\Component\Seeders;
use Illuminate\Database\Seeder;
class AddTestRight extends Seeder