PHP code example of atnic / lumen-generator
1. Go to this page and download the library: Download atnic/lumen-generator library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
atnic / lumen-generator example snippets
...
$app->withFacades();
$app->withEloquent();
...
$app->routeMiddleware([
'auth' => App\Http\Middleware\Authenticate::class,
]);
...
$app->register(App\Providers\AppServiceProvider::class);
$app->register(App\Providers\AuthServiceProvider::class);
$app->register(App\Providers\EventServiceProvider::class);
$app->register(Atnic\LumenGenerator\Providers\AppServiceProvider::class);
$app->register(Atnic\LumenGenerator\Providers\ConsoleServiceProvider::class);
$app->register(Laravel\Passport\PassportServiceProvider::class);
...
$factory->define(App\User::class, function (Faker\Generator $faker) {
return [
'name' => $faker->name,
'email' => $faker->email,
'password' => app('hash')->make('password'),
'api_token' => str_random()
];
});
/database/*.sqlite
/storage/*.key
bash
php artisan app:install
bash
php artisan make:controller --model=Foo FooController