forked from loafle/openapi-generator-original
[php-laravel] Upgrade php-laravel to 7.x (#6346)
* Update laravel from 5.6 to 7.0 * Updated petstore example, removed missing files * Updated PHP version to match composer.json * Add samples generation config with OAS3 input spec * Fixed gitignore compile errors, updated to newest petstore example * Add composer.lock to .gitignore * Fix generator gitignore location * Add integration tests * Refresh samples Co-authored-by: Yuriy Belenko <yura-bely@mail.ru>
This commit is contained in:
4
bin/configs/php-laravel.yaml
Normal file
4
bin/configs/php-laravel.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
generatorName: php-laravel
|
||||||
|
outputDir: samples/server/petstore/php-laravel
|
||||||
|
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||||
|
templateDir: modules/openapi-generator/src/main/resources/php-laravel
|
||||||
@@ -122,16 +122,17 @@ public class PhpLaravelServerCodegen extends AbstractPhpCodegen {
|
|||||||
supportingFiles.add(new SupportingFile("package.json", outputFolder, "package.json"));
|
supportingFiles.add(new SupportingFile("package.json", outputFolder, "package.json"));
|
||||||
supportingFiles.add(new SupportingFile("phpunit.xml", outputFolder, "phpunit.xml"));
|
supportingFiles.add(new SupportingFile("phpunit.xml", outputFolder, "phpunit.xml"));
|
||||||
supportingFiles.add(new SupportingFile("webpack.mix.js", outputFolder, "webpack.mix.js"));
|
supportingFiles.add(new SupportingFile("webpack.mix.js", outputFolder, "webpack.mix.js"));
|
||||||
supportingFiles.add(new SupportingFile(".env.example", outputFolder, ".env.example"));
|
supportingFiles.add(new SupportingFile("editorconfig", outputFolder, ".editorconfig"));
|
||||||
|
supportingFiles.add(new SupportingFile("env.example", outputFolder, ".env.example"));
|
||||||
|
supportingFiles.add(new SupportingFile("gitattributes", outputFolder, ".gitattributes"));
|
||||||
|
supportingFiles.add(new SupportingFile("styleci.yml", outputFolder, ".styleci.yml"));
|
||||||
supportingFiles.add(new SupportingFile("server.php", outputFolder, "server.php"));
|
supportingFiles.add(new SupportingFile("server.php", outputFolder, "server.php"));
|
||||||
|
supportingFiles.add(new SupportingFile("gitignore", outputFolder, ".gitignore"));
|
||||||
|
|
||||||
supportingFiles.add(new SupportingFile("bootstrap/cache/gitignore", outputFolder + File.separator + "bootstrap" + File.separator + "cache", ".gitignore"));
|
supportingFiles.add(new SupportingFile("bootstrap/cache/gitignore", outputFolder + File.separator + "bootstrap" + File.separator + "cache", ".gitignore"));
|
||||||
supportingFiles.add(new SupportingFile("bootstrap/app.php", outputFolder + File.separator + "bootstrap", "app.php"));
|
supportingFiles.add(new SupportingFile("bootstrap/app.php", outputFolder + File.separator + "bootstrap", "app.php"));
|
||||||
supportingFiles.add(new SupportingFile("bootstrap/testingAutoload.php", outputFolder + File.separator + "bootstrap", "testingAutoload.php"));
|
|
||||||
|
|
||||||
/* /public/ */
|
/* /public/ */
|
||||||
supportingFiles.add(new SupportingFile("public/css/app.css", outputFolder + File.separator + "public" + File.separator + "css", "app.css"));
|
|
||||||
supportingFiles.add(new SupportingFile("public/js/app.js", outputFolder + File.separator + "public" + File.separator + "js", "app.js"));
|
|
||||||
supportingFiles.add(new SupportingFile("public/.htaccess", outputFolder + File.separator + "public", ".htaccess"));
|
supportingFiles.add(new SupportingFile("public/.htaccess", outputFolder + File.separator + "public", ".htaccess"));
|
||||||
supportingFiles.add(new SupportingFile("public/favicon.ico", outputFolder + File.separator + "public", "favicon.ico"));
|
supportingFiles.add(new SupportingFile("public/favicon.ico", outputFolder + File.separator + "public", "favicon.ico"));
|
||||||
supportingFiles.add(new SupportingFile("public/index.php", outputFolder + File.separator + "public", "index.php"));
|
supportingFiles.add(new SupportingFile("public/index.php", outputFolder + File.separator + "public", "index.php"));
|
||||||
@@ -147,6 +148,8 @@ public class PhpLaravelServerCodegen extends AbstractPhpCodegen {
|
|||||||
/* /app/Http/Controllers/ */
|
/* /app/Http/Controllers/ */
|
||||||
supportingFiles.add(new SupportingFile("app/Http/Kernel.php", outputFolder + File.separator + "app" + File.separator + "Http", "Kernel.php"));
|
supportingFiles.add(new SupportingFile("app/Http/Kernel.php", outputFolder + File.separator + "app" + File.separator + "Http", "Kernel.php"));
|
||||||
supportingFiles.add(new SupportingFile("app/Http/Controllers/Controller.php", outputFolder + File.separator + "app" + File.separator + "Http" + File.separator + "Controllers", "Controller.php"));
|
supportingFiles.add(new SupportingFile("app/Http/Controllers/Controller.php", outputFolder + File.separator + "app" + File.separator + "Http" + File.separator + "Controllers", "Controller.php"));
|
||||||
|
supportingFiles.add(new SupportingFile("app/Http/Middleware/Authenticate.php", outputFolder + File.separator + "app" + File.separator + "Http" + File.separator + "Middleware", "Authenticate.php"));
|
||||||
|
supportingFiles.add(new SupportingFile("app/Http/Middleware/CheckForMaintenanceMode.php", outputFolder + File.separator + "app" + File.separator + "Http" + File.separator + "Middleware", "CheckForMaintenanceMode.php"));
|
||||||
supportingFiles.add(new SupportingFile("app/Http/Middleware/EncryptCookies.php", outputFolder + File.separator + "app" + File.separator + "Http" + File.separator + "Middleware", "EncryptCookies.php"));
|
supportingFiles.add(new SupportingFile("app/Http/Middleware/EncryptCookies.php", outputFolder + File.separator + "app" + File.separator + "Http" + File.separator + "Middleware", "EncryptCookies.php"));
|
||||||
supportingFiles.add(new SupportingFile("app/Http/Middleware/RedirectIfAuthenticated.php", outputFolder + File.separator + "app" + File.separator + "Http" + File.separator + "Middleware", "RedirectIfAuthenticated.php"));
|
supportingFiles.add(new SupportingFile("app/Http/Middleware/RedirectIfAuthenticated.php", outputFolder + File.separator + "app" + File.separator + "Http" + File.separator + "Middleware", "RedirectIfAuthenticated.php"));
|
||||||
supportingFiles.add(new SupportingFile("app/Http/Middleware/TrimStrings.php", outputFolder + File.separator + "app" + File.separator + "Http" + File.separator + "Middleware", "TrimStrings.php"));
|
supportingFiles.add(new SupportingFile("app/Http/Middleware/TrimStrings.php", outputFolder + File.separator + "app" + File.separator + "Http" + File.separator + "Middleware", "TrimStrings.php"));
|
||||||
@@ -163,11 +166,13 @@ public class PhpLaravelServerCodegen extends AbstractPhpCodegen {
|
|||||||
supportingFiles.add(new SupportingFile("app/Providers/BroadcastServiceProvider.php", outputFolder + File.separator + "app" + File.separator + "Providers", "BroadcastServiceProvider.php"));
|
supportingFiles.add(new SupportingFile("app/Providers/BroadcastServiceProvider.php", outputFolder + File.separator + "app" + File.separator + "Providers", "BroadcastServiceProvider.php"));
|
||||||
supportingFiles.add(new SupportingFile("app/Providers/EventServiceProvider.php", outputFolder + File.separator + "app" + File.separator + "Providers", "EventServiceProvider.php"));
|
supportingFiles.add(new SupportingFile("app/Providers/EventServiceProvider.php", outputFolder + File.separator + "app" + File.separator + "Providers", "EventServiceProvider.php"));
|
||||||
supportingFiles.add(new SupportingFile("app/Providers/RouteServiceProvider.php", outputFolder + File.separator + "app" + File.separator + "Providers", "RouteServiceProvider.php"));
|
supportingFiles.add(new SupportingFile("app/Providers/RouteServiceProvider.php", outputFolder + File.separator + "app" + File.separator + "Providers", "RouteServiceProvider.php"));
|
||||||
|
// /app/
|
||||||
|
supportingFiles.add(new SupportingFile("app/User.php", outputFolder + File.separator + "app", "RouteServiceProvider.php"));
|
||||||
|
|
||||||
// /database/
|
// /database/
|
||||||
supportingFiles.add(new SupportingFile("database/factories/UserFactory.php", outputFolder + File.separator + "database" + File.separator + "factories", "UserFactory.php"));
|
supportingFiles.add(new SupportingFile("database/factories/UserFactory.php", outputFolder + File.separator + "database" + File.separator + "factories", "UserFactory.php"));
|
||||||
supportingFiles.add(new SupportingFile("database/migrations/2014_10_12_000000_create_users_table.php", outputFolder + File.separator + "database" + File.separator + "migrations", "2014_10_12_000000_create_users_table.php"));
|
supportingFiles.add(new SupportingFile("database/migrations/2014_10_12_000000_create_users_table.php", outputFolder + File.separator + "database" + File.separator + "migrations", "2014_10_12_000000_create_users_table.php"));
|
||||||
supportingFiles.add(new SupportingFile("database/migrations/2014_10_12_100000_create_password_resets_table.php", outputFolder + File.separator + "database" + File.separator + "migrations", "2014_10_12_100000_create_password_resets_table.php"));
|
supportingFiles.add(new SupportingFile("database/migrations/2019_08_19_000000_create_failed_jobs_table.php", outputFolder + File.separator + "database" + File.separator + "migrations", "2019_08_19_000000_create_failed_jobs_table.php"));
|
||||||
supportingFiles.add(new SupportingFile("database/seeds/DatabaseSeeder.php", outputFolder + File.separator + "database" + File.separator + "seeds", "DatabaseSeeder.php"));
|
supportingFiles.add(new SupportingFile("database/seeds/DatabaseSeeder.php", outputFolder + File.separator + "database" + File.separator + "seeds", "DatabaseSeeder.php"));
|
||||||
supportingFiles.add(new SupportingFile("database/gitignore", outputFolder + File.separator + "database", ".gitignore"));
|
supportingFiles.add(new SupportingFile("database/gitignore", outputFolder + File.separator + "database", ".gitignore"));
|
||||||
|
|
||||||
@@ -176,6 +181,7 @@ public class PhpLaravelServerCodegen extends AbstractPhpCodegen {
|
|||||||
supportingFiles.add(new SupportingFile("config/auth.php", outputFolder + File.separator + "config", "auth.php"));
|
supportingFiles.add(new SupportingFile("config/auth.php", outputFolder + File.separator + "config", "auth.php"));
|
||||||
supportingFiles.add(new SupportingFile("config/broadcasting.php", outputFolder + File.separator + "config", "broadcasting.php"));
|
supportingFiles.add(new SupportingFile("config/broadcasting.php", outputFolder + File.separator + "config", "broadcasting.php"));
|
||||||
supportingFiles.add(new SupportingFile("config/cache.php", outputFolder + File.separator + "config", "cache.php"));
|
supportingFiles.add(new SupportingFile("config/cache.php", outputFolder + File.separator + "config", "cache.php"));
|
||||||
|
supportingFiles.add(new SupportingFile("config/cors.php", outputFolder + File.separator + "config", "cors.php"));
|
||||||
supportingFiles.add(new SupportingFile("config/database.php", outputFolder + File.separator + "config", "database.php"));
|
supportingFiles.add(new SupportingFile("config/database.php", outputFolder + File.separator + "config", "database.php"));
|
||||||
supportingFiles.add(new SupportingFile("config/filesystems.php", outputFolder + File.separator + "config", "filesystems.php"));
|
supportingFiles.add(new SupportingFile("config/filesystems.php", outputFolder + File.separator + "config", "filesystems.php"));
|
||||||
supportingFiles.add(new SupportingFile("config/hashing.php", outputFolder + File.separator + "config", "hashing.php"));
|
supportingFiles.add(new SupportingFile("config/hashing.php", outputFolder + File.separator + "config", "hashing.php"));
|
||||||
@@ -186,12 +192,13 @@ public class PhpLaravelServerCodegen extends AbstractPhpCodegen {
|
|||||||
supportingFiles.add(new SupportingFile("config/session.php", outputFolder + File.separator + "config", "session.php"));
|
supportingFiles.add(new SupportingFile("config/session.php", outputFolder + File.separator + "config", "session.php"));
|
||||||
supportingFiles.add(new SupportingFile("config/view.php", outputFolder + File.separator + "config", "view.php"));
|
supportingFiles.add(new SupportingFile("config/view.php", outputFolder + File.separator + "config", "view.php"));
|
||||||
|
|
||||||
|
// /database/
|
||||||
|
supportingFiles.add(new SupportingFile("database/migrations/2019_08_19_000000_create_failed_jobs_table.php", outputFolder + File.separator + "database" + File.separator + "migrations", "2019_08_19_000000_create_failed_jobs_table.php"));
|
||||||
|
|
||||||
// /resources/
|
// /resources/
|
||||||
supportingFiles.add(new SupportingFile("resources/assets/js/components/ExampleComponent.vue", outputFolder + File.separator + "resources" + File.separator + "assets" + File.separator + "js" + File.separator + "components", "ExampleComponent.vue"));
|
supportingFiles.add(new SupportingFile("resources/js/app.js", outputFolder + File.separator + "resources" + File.separator + "assets" + File.separator + "js", "app.js"));
|
||||||
supportingFiles.add(new SupportingFile("resources/assets/js/app.js", outputFolder + File.separator + "resources" + File.separator + "assets" + File.separator + "js", "app.js"));
|
supportingFiles.add(new SupportingFile("resources/js/bootstrap.js", outputFolder + File.separator + "resources" + File.separator + "assets" + File.separator + "js", "bootstrap.js"));
|
||||||
supportingFiles.add(new SupportingFile("resources/assets/js/bootstrap.js", outputFolder + File.separator + "resources" + File.separator + "assets" + File.separator + "js", "bootstrap.js"));
|
supportingFiles.add(new SupportingFile("resources/sass/app.scss", outputFolder + File.separator + "resources" + File.separator + "assets" + File.separator + "sass", "app.scss"));
|
||||||
supportingFiles.add(new SupportingFile("resources/assets/sass/_variables.scss", outputFolder + File.separator + "resources" + File.separator + "assets" + File.separator + "sass", "_variables.scss"));
|
|
||||||
supportingFiles.add(new SupportingFile("resources/assets/sass/app.scss", outputFolder + File.separator + "resources" + File.separator + "assets" + File.separator + "sass", "app.scss"));
|
|
||||||
supportingFiles.add(new SupportingFile("resources/lang/en/auth.php", outputFolder + File.separator + "resources" + File.separator + "lang" + File.separator + "en", "auth.php"));
|
supportingFiles.add(new SupportingFile("resources/lang/en/auth.php", outputFolder + File.separator + "resources" + File.separator + "lang" + File.separator + "en", "auth.php"));
|
||||||
supportingFiles.add(new SupportingFile("resources/lang/en/pagination.php", outputFolder + File.separator + "resources" + File.separator + "lang" + File.separator + "en", "pagination.php"));
|
supportingFiles.add(new SupportingFile("resources/lang/en/pagination.php", outputFolder + File.separator + "resources" + File.separator + "lang" + File.separator + "en", "pagination.php"));
|
||||||
supportingFiles.add(new SupportingFile("resources/lang/en/passwords.php", outputFolder + File.separator + "resources" + File.separator + "lang" + File.separator + "en", "passwords.php"));
|
supportingFiles.add(new SupportingFile("resources/lang/en/passwords.php", outputFolder + File.separator + "resources" + File.separator + "lang" + File.separator + "en", "passwords.php"));
|
||||||
@@ -203,6 +210,7 @@ public class PhpLaravelServerCodegen extends AbstractPhpCodegen {
|
|||||||
supportingFiles.add(new SupportingFile("storage/app/public/gitignore", outputFolder + File.separator + "storage" + File.separator + "app" + File.separator + "public", ".gitignore"));
|
supportingFiles.add(new SupportingFile("storage/app/public/gitignore", outputFolder + File.separator + "storage" + File.separator + "app" + File.separator + "public", ".gitignore"));
|
||||||
supportingFiles.add(new SupportingFile("storage/framework/gitignore", outputFolder + File.separator + "storage" + File.separator + "framework", ".gitignore"));
|
supportingFiles.add(new SupportingFile("storage/framework/gitignore", outputFolder + File.separator + "storage" + File.separator + "framework", ".gitignore"));
|
||||||
supportingFiles.add(new SupportingFile("storage/framework/cache/gitignore", outputFolder + File.separator + "storage" + File.separator + "framework" + File.separator + "cache", ".gitignore"));
|
supportingFiles.add(new SupportingFile("storage/framework/cache/gitignore", outputFolder + File.separator + "storage" + File.separator + "framework" + File.separator + "cache", ".gitignore"));
|
||||||
|
supportingFiles.add(new SupportingFile("storage/framework/cache/data/gitignore", outputFolder + File.separator + "storage" + File.separator + "framework" + File.separator + "cache", ".gitignore"));
|
||||||
supportingFiles.add(new SupportingFile("storage/framework/sessions/gitignore", outputFolder + File.separator + "storage" + File.separator + "framework" + File.separator + "sessions", ".gitignore"));
|
supportingFiles.add(new SupportingFile("storage/framework/sessions/gitignore", outputFolder + File.separator + "storage" + File.separator + "framework" + File.separator + "sessions", ".gitignore"));
|
||||||
supportingFiles.add(new SupportingFile("storage/framework/testing/gitignore", outputFolder + File.separator + "storage" + File.separator + "framework" + File.separator + "testing", ".gitignore"));
|
supportingFiles.add(new SupportingFile("storage/framework/testing/gitignore", outputFolder + File.separator + "storage" + File.separator + "framework" + File.separator + "testing", ".gitignore"));
|
||||||
supportingFiles.add(new SupportingFile("storage/framework/views/gitignore", outputFolder + File.separator + "storage" + File.separator + "framework" + File.separator + "views", ".gitignore"));
|
supportingFiles.add(new SupportingFile("storage/framework/views/gitignore", outputFolder + File.separator + "storage" + File.separator + "framework" + File.separator + "views", ".gitignore"));
|
||||||
@@ -215,6 +223,14 @@ public class PhpLaravelServerCodegen extends AbstractPhpCodegen {
|
|||||||
supportingFiles.add(new SupportingFile("tests/TestCase.php", outputFolder + File.separator + "tests", "TestCase.php"));
|
supportingFiles.add(new SupportingFile("tests/TestCase.php", outputFolder + File.separator + "tests", "TestCase.php"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void processOpts() {
|
||||||
|
super.processOpts();
|
||||||
|
|
||||||
|
// remove gitignore supporting file from AbstractPhpCodegen
|
||||||
|
supportingFiles.remove(supportingFiles.size() - 1);
|
||||||
|
}
|
||||||
|
|
||||||
// override with any special post-processing
|
// override with any special post-processing
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> postProcessOperationsWithModels(Map<String, Object> objs, List<Object> allModels) {
|
public Map<String, Object> postProcessOperationsWithModels(Map<String, Object> objs, List<Object> allModels) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# OpenAPI generated server
|
# OpenAPI generated server
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
* PHP 7.1.3 or newer
|
* PHP 7.2.5 or newer
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
This server was generated by the [openapi-generator](https://github.com/openapitools/openapi-generator) project. By using the
|
This server was generated by the [openapi-generator](https://github.com/openapitools/openapi-generator) project. By using the
|
||||||
|
|||||||
@@ -24,8 +24,7 @@ class Kernel extends ConsoleKernel
|
|||||||
*/
|
*/
|
||||||
protected function schedule(Schedule $schedule)
|
protected function schedule(Schedule $schedule)
|
||||||
{
|
{
|
||||||
// $schedule->command('inspire')
|
// $schedule->command('inspire')->hourly();
|
||||||
// ->hourly();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
namespace App\Exceptions;
|
namespace App\Exceptions;
|
||||||
|
|
||||||
use Exception;
|
|
||||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||||
|
use Throwable;
|
||||||
|
|
||||||
class Handler extends ExceptionHandler
|
class Handler extends ExceptionHandler
|
||||||
{
|
{
|
||||||
@@ -29,10 +29,12 @@ class Handler extends ExceptionHandler
|
|||||||
/**
|
/**
|
||||||
* Report or log an exception.
|
* Report or log an exception.
|
||||||
*
|
*
|
||||||
* @param \Exception $exception
|
* @param \Throwable $exception
|
||||||
* @return void
|
* @return void
|
||||||
|
*
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function report(Exception $exception)
|
public function report(Throwable $exception)
|
||||||
{
|
{
|
||||||
parent::report($exception);
|
parent::report($exception);
|
||||||
}
|
}
|
||||||
@@ -41,10 +43,12 @@ class Handler extends ExceptionHandler
|
|||||||
* Render an exception into an HTTP response.
|
* Render an exception into an HTTP response.
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Http\Request $request
|
* @param \Illuminate\Http\Request $request
|
||||||
* @param \Exception $exception
|
* @param \Throwable $exception
|
||||||
* @return \Illuminate\Http\Response
|
* @return \Symfony\Component\HttpFoundation\Response
|
||||||
|
*
|
||||||
|
* @throws \Throwable
|
||||||
*/
|
*/
|
||||||
public function render($request, Exception $exception)
|
public function render($request, Throwable $exception)
|
||||||
{
|
{
|
||||||
return parent::render($request, $exception);
|
return parent::render($request, $exception);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,20 +7,7 @@ use Illuminate\Foundation\Bus\DispatchesJobs;
|
|||||||
use Illuminate\Foundation\Validation\ValidatesRequests;
|
use Illuminate\Foundation\Validation\ValidatesRequests;
|
||||||
use Illuminate\Routing\Controller as BaseController;
|
use Illuminate\Routing\Controller as BaseController;
|
||||||
|
|
||||||
/**
|
|
||||||
* Class Controller
|
|
||||||
*
|
|
||||||
* @package App\Http\Controllers
|
|
||||||
*/
|
|
||||||
class Controller extends BaseController
|
class Controller extends BaseController
|
||||||
{
|
{
|
||||||
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
|
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
|
||||||
|
|
||||||
/**
|
|
||||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
|
||||||
*/
|
|
||||||
public function welcome()
|
|
||||||
{
|
|
||||||
return view('welcome');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,11 +14,12 @@ class Kernel extends HttpKernel
|
|||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $middleware = [
|
protected $middleware = [
|
||||||
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
|
\App\Http\Middleware\TrustProxies::class,
|
||||||
|
\Fruitcake\Cors\HandleCors::class,
|
||||||
|
\App\Http\Middleware\CheckForMaintenanceMode::class,
|
||||||
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
|
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
|
||||||
\App\Http\Middleware\TrimStrings::class,
|
\App\Http\Middleware\TrimStrings::class,
|
||||||
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
|
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
|
||||||
\App\Http\Middleware\TrustProxies::class,
|
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -39,7 +40,7 @@ class Kernel extends HttpKernel
|
|||||||
|
|
||||||
'api' => [
|
'api' => [
|
||||||
'throttle:60,1',
|
'throttle:60,1',
|
||||||
'bindings',
|
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -51,13 +52,15 @@ class Kernel extends HttpKernel
|
|||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $routeMiddleware = [
|
protected $routeMiddleware = [
|
||||||
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
|
'auth' => \App\Http\Middleware\Authenticate::class,
|
||||||
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
||||||
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
|
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||||
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
|
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
|
||||||
'can' => \Illuminate\Auth\Middleware\Authorize::class,
|
'can' => \Illuminate\Auth\Middleware\Authorize::class,
|
||||||
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
||||||
|
'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
|
||||||
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
|
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
|
||||||
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
||||||
|
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Illuminate\Auth\Middleware\Authenticate as Middleware;
|
||||||
|
|
||||||
|
class Authenticate extends Middleware
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Get the path the user should be redirected to when they are not authenticated.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @return string|null
|
||||||
|
*/
|
||||||
|
protected function redirectTo($request)
|
||||||
|
{
|
||||||
|
if (! $request->expectsJson()) {
|
||||||
|
return route('login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode as Middleware;
|
||||||
|
|
||||||
|
class CheckForMaintenanceMode extends Middleware
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The URIs that should be reachable while maintenance mode is enabled.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $except = [
|
||||||
|
//
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Http\Middleware;
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use App\Providers\RouteServiceProvider;
|
||||||
use Closure;
|
use Closure;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
|
||||||
@@ -18,7 +19,7 @@ class RedirectIfAuthenticated
|
|||||||
public function handle($request, Closure $next, $guard = null)
|
public function handle($request, Closure $next, $guard = null)
|
||||||
{
|
{
|
||||||
if (Auth::guard($guard)->check()) {
|
if (Auth::guard($guard)->check()) {
|
||||||
return redirect('/home');
|
return redirect(RouteServiceProvider::HOME);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $next($request);
|
return $next($request);
|
||||||
|
|||||||
@@ -2,15 +2,15 @@
|
|||||||
|
|
||||||
namespace App\Http\Middleware;
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Fideloper\Proxy\TrustProxies as Middleware;
|
use Fideloper\Proxy\TrustProxies as Middleware;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
class TrustProxies extends Middleware
|
class TrustProxies extends Middleware
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* The trusted proxies for this application.
|
* The trusted proxies for this application.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array|string|null
|
||||||
*/
|
*/
|
||||||
protected $proxies;
|
protected $proxies;
|
||||||
|
|
||||||
|
|||||||
@@ -6,16 +6,6 @@ use Illuminate\Support\ServiceProvider;
|
|||||||
|
|
||||||
class AppServiceProvider extends ServiceProvider
|
class AppServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* Bootstrap any application services.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function boot()
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register any application services.
|
* Register any application services.
|
||||||
*
|
*
|
||||||
@@ -25,4 +15,14 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
{
|
{
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Bootstrap any application services.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function boot()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
namespace App\Providers;
|
namespace App\Providers;
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Gate;
|
|
||||||
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
||||||
|
use Illuminate\Support\Facades\Gate;
|
||||||
|
|
||||||
class AuthServiceProvider extends ServiceProvider
|
class AuthServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
@@ -13,7 +13,7 @@ class AuthServiceProvider extends ServiceProvider
|
|||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $policies = [
|
protected $policies = [
|
||||||
'App\Model' => 'App\Policies\ModelPolicy',
|
// 'App\Model' => 'App\Policies\ModelPolicy',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
namespace App\Providers;
|
namespace App\Providers;
|
||||||
|
|
||||||
use Illuminate\Support\ServiceProvider;
|
|
||||||
use Illuminate\Support\Facades\Broadcast;
|
use Illuminate\Support\Facades\Broadcast;
|
||||||
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
|
||||||
class BroadcastServiceProvider extends ServiceProvider
|
class BroadcastServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,8 +2,10 @@
|
|||||||
|
|
||||||
namespace App\Providers;
|
namespace App\Providers;
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Event;
|
use Illuminate\Auth\Events\Registered;
|
||||||
|
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
|
||||||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||||
|
use Illuminate\Support\Facades\Event;
|
||||||
|
|
||||||
class EventServiceProvider extends ServiceProvider
|
class EventServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
@@ -13,8 +15,8 @@ class EventServiceProvider extends ServiceProvider
|
|||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $listen = [
|
protected $listen = [
|
||||||
'App\Events\Event' => [
|
Registered::class => [
|
||||||
'App\Listeners\EventListener',
|
SendEmailVerificationNotification::class,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
namespace App\Providers;
|
namespace App\Providers;
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Route;
|
|
||||||
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
||||||
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
||||||
class RouteServiceProvider extends ServiceProvider
|
class RouteServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
@@ -16,6 +16,13 @@ class RouteServiceProvider extends ServiceProvider
|
|||||||
*/
|
*/
|
||||||
protected $namespace = 'App\Http\Controllers';
|
protected $namespace = 'App\Http\Controllers';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The path to the "home" route for your application.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public const HOME = '/home';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Define your route model bindings, pattern filters, etc.
|
* Define your route model bindings, pattern filters, etc.
|
||||||
*
|
*
|
||||||
@@ -52,8 +59,8 @@ class RouteServiceProvider extends ServiceProvider
|
|||||||
protected function mapWebRoutes()
|
protected function mapWebRoutes()
|
||||||
{
|
{
|
||||||
Route::middleware('web')
|
Route::middleware('web')
|
||||||
->namespace($this->namespace)
|
->namespace($this->namespace)
|
||||||
->group(base_path('routes/web.php'));
|
->group(base_path('routes/web.php'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -65,8 +72,9 @@ class RouteServiceProvider extends ServiceProvider
|
|||||||
*/
|
*/
|
||||||
protected function mapApiRoutes()
|
protected function mapApiRoutes()
|
||||||
{
|
{
|
||||||
Route::middleware('api')
|
Route::prefix('api')
|
||||||
->namespace($this->namespace)
|
->middleware('api')
|
||||||
->group(base_path('routes/api.php'));
|
->namespace($this->namespace)
|
||||||
|
->group(base_path('routes/api.php'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App;
|
||||||
|
|
||||||
|
use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||||
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||||
|
use Illuminate\Notifications\Notifiable;
|
||||||
|
|
||||||
|
class User extends Authenticatable
|
||||||
|
{
|
||||||
|
use Notifiable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes that are mass assignable.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $fillable = [
|
||||||
|
'name', 'email', 'password',
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes that should be hidden for arrays.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $hidden = [
|
||||||
|
'password', 'remember_token',
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes that should be cast to native types.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $casts = [
|
||||||
|
'email_verified_at' => 'datetime',
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$app = new Illuminate\Foundation\Application(
|
$app = new Illuminate\Foundation\Application(
|
||||||
realpath(__DIR__.'/../')
|
$_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
*
|
*
|
||||||
|
!data/
|
||||||
!.gitignore
|
!.gitignore
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
passthru("php artisan --env='testing' migrate:fresh");
|
|
||||||
passthru("php artisan --env='testing' db:seed");
|
|
||||||
|
|
||||||
require realpath(__DIR__ . '/../vendor/autoload.php');
|
|
||||||
@@ -8,59 +8,56 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.1.3",
|
"php": "^7.2.5",
|
||||||
"fideloper/proxy": "^4.0",
|
"fideloper/proxy": "^4.2",
|
||||||
"laravel/framework": "5.6.*",
|
"fruitcake/laravel-cors": "^1.0",
|
||||||
"laravel/tinker": "^1.0"
|
"guzzlehttp/guzzle": "^6.3",
|
||||||
|
"laravel/framework": "^7.0",
|
||||||
|
"laravel/tinker": "^2.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"filp/whoops": "^2.0",
|
"facade/ignition": "^2.0",
|
||||||
"fzaninotto/faker": "^1.4",
|
"fzaninotto/faker": "^1.9.1",
|
||||||
"mockery/mockery": "^1.0",
|
"mockery/mockery": "^1.3.1",
|
||||||
"nunomaduro/collision": "^2.0",
|
"nunomaduro/collision": "^4.1",
|
||||||
"phpunit/phpunit": "^7.0",
|
"phpunit/phpunit": "^8.5"
|
||||||
"phpspec/phpspec": "^4.2",
|
|
||||||
"squizlabs/php_codesniffer": "^3.0"
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"classmap": [
|
|
||||||
"database/seeds",
|
|
||||||
"database/migrations",
|
|
||||||
"database/factories"
|
|
||||||
],
|
|
||||||
"psr-4": {
|
|
||||||
"App\\": "app/",
|
|
||||||
"Tests\\": "tests/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload-dev": {
|
|
||||||
"psr-4": {
|
|
||||||
"Tests\\": "tests/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"extra": {
|
|
||||||
"laravel": {
|
|
||||||
"dont-discover": [
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"post-root-package-install": [
|
|
||||||
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
|
|
||||||
],
|
|
||||||
"post-create-project-cmd": [
|
|
||||||
"@php artisan key:generate"
|
|
||||||
],
|
|
||||||
"post-autoload-dump": [
|
|
||||||
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
|
|
||||||
"@php artisan package:discover"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"preferred-install": "dist",
|
"optimize-autoloader": true,
|
||||||
"sort-packages": true,
|
"preferred-install": "dist",
|
||||||
"optimize-autoloader": true
|
"sort-packages": true
|
||||||
},
|
},
|
||||||
"minimum-stability": "dev",
|
"extra": {
|
||||||
"prefer-stable": true
|
"laravel": {
|
||||||
|
"dont-discover": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"App\\": "app/"
|
||||||
|
},
|
||||||
|
"classmap": [
|
||||||
|
"database/seeds",
|
||||||
|
"database/factories"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"autoload-dev": {
|
||||||
|
"psr-4": {
|
||||||
|
"Tests\\": "tests/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"minimum-stability": "dev",
|
||||||
|
"prefer-stable": true,
|
||||||
|
"scripts": {
|
||||||
|
"post-autoload-dump": [
|
||||||
|
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
|
||||||
|
"@php artisan package:discover --ansi"
|
||||||
|
],
|
||||||
|
"post-root-package-install": [
|
||||||
|
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
|
||||||
|
],
|
||||||
|
"post-create-project-cmd": [
|
||||||
|
"@php artisan key:generate --ansi"
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ return [
|
|||||||
|
|
|
|
||||||
| This value determines the "environment" your application is currently
|
| This value determines the "environment" your application is currently
|
||||||
| running in. This may determine how you prefer to configure various
|
| running in. This may determine how you prefer to configure various
|
||||||
| services your application utilizes. Set this in your ".env" file.
|
| services the application utilizes. Set this in your ".env" file.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ return [
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'debug' => env('APP_DEBUG', false),
|
'debug' => (bool) env('APP_DEBUG', false),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@@ -54,6 +54,8 @@ return [
|
|||||||
|
|
||||||
'url' => env('APP_URL', 'http://localhost'),
|
'url' => env('APP_URL', 'http://localhost'),
|
||||||
|
|
||||||
|
'asset_url' => env('ASSET_URL', null),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Application Timezone
|
| Application Timezone
|
||||||
@@ -93,6 +95,19 @@ return [
|
|||||||
|
|
||||||
'fallback_locale' => 'en',
|
'fallback_locale' => 'en',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Faker Locale
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This locale will be used by the Faker PHP library when generating fake
|
||||||
|
| data for your database seeds. For example, this will be used to get
|
||||||
|
| localized telephone numbers, street address information and more.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'faker_locale' => 'en_US',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Encryption Key
|
| Encryption Key
|
||||||
@@ -176,6 +191,7 @@ return [
|
|||||||
'aliases' => [
|
'aliases' => [
|
||||||
|
|
||||||
'App' => Illuminate\Support\Facades\App::class,
|
'App' => Illuminate\Support\Facades\App::class,
|
||||||
|
'Arr' => Illuminate\Support\Arr::class,
|
||||||
'Artisan' => Illuminate\Support\Facades\Artisan::class,
|
'Artisan' => Illuminate\Support\Facades\Artisan::class,
|
||||||
'Auth' => Illuminate\Support\Facades\Auth::class,
|
'Auth' => Illuminate\Support\Facades\Auth::class,
|
||||||
'Blade' => Illuminate\Support\Facades\Blade::class,
|
'Blade' => Illuminate\Support\Facades\Blade::class,
|
||||||
@@ -191,6 +207,7 @@ return [
|
|||||||
'File' => Illuminate\Support\Facades\File::class,
|
'File' => Illuminate\Support\Facades\File::class,
|
||||||
'Gate' => Illuminate\Support\Facades\Gate::class,
|
'Gate' => Illuminate\Support\Facades\Gate::class,
|
||||||
'Hash' => Illuminate\Support\Facades\Hash::class,
|
'Hash' => Illuminate\Support\Facades\Hash::class,
|
||||||
|
'Http' => Illuminate\Support\Facades\Http::class,
|
||||||
'Lang' => Illuminate\Support\Facades\Lang::class,
|
'Lang' => Illuminate\Support\Facades\Lang::class,
|
||||||
'Log' => Illuminate\Support\Facades\Log::class,
|
'Log' => Illuminate\Support\Facades\Log::class,
|
||||||
'Mail' => Illuminate\Support\Facades\Mail::class,
|
'Mail' => Illuminate\Support\Facades\Mail::class,
|
||||||
@@ -205,6 +222,7 @@ return [
|
|||||||
'Schema' => Illuminate\Support\Facades\Schema::class,
|
'Schema' => Illuminate\Support\Facades\Schema::class,
|
||||||
'Session' => Illuminate\Support\Facades\Session::class,
|
'Session' => Illuminate\Support\Facades\Session::class,
|
||||||
'Storage' => Illuminate\Support\Facades\Storage::class,
|
'Storage' => Illuminate\Support\Facades\Storage::class,
|
||||||
|
'Str' => Illuminate\Support\Str::class,
|
||||||
'URL' => Illuminate\Support\Facades\URL::class,
|
'URL' => Illuminate\Support\Facades\URL::class,
|
||||||
'Validator' => Illuminate\Support\Facades\Validator::class,
|
'Validator' => Illuminate\Support\Facades\Validator::class,
|
||||||
'View' => Illuminate\Support\Facades\View::class,
|
'View' => Illuminate\Support\Facades\View::class,
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ return [
|
|||||||
'api' => [
|
'api' => [
|
||||||
'driver' => 'token',
|
'driver' => 'token',
|
||||||
'provider' => 'users',
|
'provider' => 'users',
|
||||||
|
'hash' => false,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
@@ -96,7 +97,21 @@ return [
|
|||||||
'provider' => 'users',
|
'provider' => 'users',
|
||||||
'table' => 'password_resets',
|
'table' => 'password_resets',
|
||||||
'expire' => 60,
|
'expire' => 60,
|
||||||
|
'throttle' => 60,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Password Confirmation Timeout
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may define the amount of seconds before a password confirmation
|
||||||
|
| times out and the user is prompted to re-enter their password via the
|
||||||
|
| confirmation screen. By default, the timeout lasts for three hours.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'password_timeout' => 10800,
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ return [
|
|||||||
'app_id' => env('PUSHER_APP_ID'),
|
'app_id' => env('PUSHER_APP_ID'),
|
||||||
'options' => [
|
'options' => [
|
||||||
'cluster' => env('PUSHER_APP_CLUSTER'),
|
'cluster' => env('PUSHER_APP_CLUSTER'),
|
||||||
'encrypted' => true,
|
'useTLS' => true,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -11,7 +13,8 @@ return [
|
|||||||
| using this caching library. This connection is used when another is
|
| using this caching library. This connection is used when another is
|
||||||
| not explicitly specified when executing a given caching function.
|
| not explicitly specified when executing a given caching function.
|
||||||
|
|
|
|
||||||
| Supported: "apc", "array", "database", "file", "memcached", "redis"
|
| Supported: "apc", "array", "database", "file",
|
||||||
|
| "memcached", "redis", "dynamodb"
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -36,6 +39,7 @@ return [
|
|||||||
|
|
||||||
'array' => [
|
'array' => [
|
||||||
'driver' => 'array',
|
'driver' => 'array',
|
||||||
|
'serialize' => false,
|
||||||
],
|
],
|
||||||
|
|
||||||
'database' => [
|
'database' => [
|
||||||
@@ -57,7 +61,7 @@ return [
|
|||||||
env('MEMCACHED_PASSWORD'),
|
env('MEMCACHED_PASSWORD'),
|
||||||
],
|
],
|
||||||
'options' => [
|
'options' => [
|
||||||
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
|
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
|
||||||
],
|
],
|
||||||
'servers' => [
|
'servers' => [
|
||||||
[
|
[
|
||||||
@@ -70,7 +74,16 @@ return [
|
|||||||
|
|
||||||
'redis' => [
|
'redis' => [
|
||||||
'driver' => 'redis',
|
'driver' => 'redis',
|
||||||
'connection' => 'default',
|
'connection' => 'cache',
|
||||||
|
],
|
||||||
|
|
||||||
|
'dynamodb' => [
|
||||||
|
'driver' => 'dynamodb',
|
||||||
|
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||||
|
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||||
|
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||||
|
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
|
||||||
|
'endpoint' => env('DYNAMODB_ENDPOINT'),
|
||||||
],
|
],
|
||||||
|
|
||||||
],
|
],
|
||||||
@@ -86,9 +99,6 @@ return [
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'prefix' => env(
|
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'),
|
||||||
'CACHE_PREFIX',
|
|
||||||
str_slug(env('APP_NAME', 'laravel'), '_').'_cache'
|
|
||||||
),
|
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Cross-Origin Resource Sharing (CORS) Configuration
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may configure your settings for cross-origin resource sharing
|
||||||
|
| or "CORS". This determines what cross-origin operations may execute
|
||||||
|
| in web browsers. You are free to adjust these settings as needed.
|
||||||
|
|
|
||||||
|
| To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'paths' => ['api/*'],
|
||||||
|
|
||||||
|
'allowed_methods' => ['*'],
|
||||||
|
|
||||||
|
'allowed_origins' => ['*'],
|
||||||
|
|
||||||
|
'allowed_origins_patterns' => [],
|
||||||
|
|
||||||
|
'allowed_headers' => ['*'],
|
||||||
|
|
||||||
|
'exposed_headers' => [],
|
||||||
|
|
||||||
|
'max_age' => 0,
|
||||||
|
|
||||||
|
'supports_credentials' => false,
|
||||||
|
|
||||||
|
];
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -35,12 +37,15 @@ return [
|
|||||||
|
|
||||||
'sqlite' => [
|
'sqlite' => [
|
||||||
'driver' => 'sqlite',
|
'driver' => 'sqlite',
|
||||||
|
'url' => env('DATABASE_URL'),
|
||||||
'database' => env('DB_DATABASE', database_path('database.sqlite')),
|
'database' => env('DB_DATABASE', database_path('database.sqlite')),
|
||||||
'prefix' => '',
|
'prefix' => '',
|
||||||
|
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
|
||||||
],
|
],
|
||||||
|
|
||||||
'mysql' => [
|
'mysql' => [
|
||||||
'driver' => 'mysql',
|
'driver' => 'mysql',
|
||||||
|
'url' => env('DATABASE_URL'),
|
||||||
'host' => env('DB_HOST', '127.0.0.1'),
|
'host' => env('DB_HOST', '127.0.0.1'),
|
||||||
'port' => env('DB_PORT', '3306'),
|
'port' => env('DB_PORT', '3306'),
|
||||||
'database' => env('DB_DATABASE', 'forge'),
|
'database' => env('DB_DATABASE', 'forge'),
|
||||||
@@ -50,12 +55,17 @@ return [
|
|||||||
'charset' => 'utf8mb4',
|
'charset' => 'utf8mb4',
|
||||||
'collation' => 'utf8mb4_unicode_ci',
|
'collation' => 'utf8mb4_unicode_ci',
|
||||||
'prefix' => '',
|
'prefix' => '',
|
||||||
|
'prefix_indexes' => true,
|
||||||
'strict' => true,
|
'strict' => true,
|
||||||
'engine' => null,
|
'engine' => null,
|
||||||
|
'options' => extension_loaded('pdo_mysql') ? array_filter([
|
||||||
|
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
|
||||||
|
]) : [],
|
||||||
],
|
],
|
||||||
|
|
||||||
'pgsql' => [
|
'pgsql' => [
|
||||||
'driver' => 'pgsql',
|
'driver' => 'pgsql',
|
||||||
|
'url' => env('DATABASE_URL'),
|
||||||
'host' => env('DB_HOST', '127.0.0.1'),
|
'host' => env('DB_HOST', '127.0.0.1'),
|
||||||
'port' => env('DB_PORT', '5432'),
|
'port' => env('DB_PORT', '5432'),
|
||||||
'database' => env('DB_DATABASE', 'forge'),
|
'database' => env('DB_DATABASE', 'forge'),
|
||||||
@@ -63,12 +73,14 @@ return [
|
|||||||
'password' => env('DB_PASSWORD', ''),
|
'password' => env('DB_PASSWORD', ''),
|
||||||
'charset' => 'utf8',
|
'charset' => 'utf8',
|
||||||
'prefix' => '',
|
'prefix' => '',
|
||||||
|
'prefix_indexes' => true,
|
||||||
'schema' => 'public',
|
'schema' => 'public',
|
||||||
'sslmode' => 'prefer',
|
'sslmode' => 'prefer',
|
||||||
],
|
],
|
||||||
|
|
||||||
'sqlsrv' => [
|
'sqlsrv' => [
|
||||||
'driver' => 'sqlsrv',
|
'driver' => 'sqlsrv',
|
||||||
|
'url' => env('DATABASE_URL'),
|
||||||
'host' => env('DB_HOST', 'localhost'),
|
'host' => env('DB_HOST', 'localhost'),
|
||||||
'port' => env('DB_PORT', '1433'),
|
'port' => env('DB_PORT', '1433'),
|
||||||
'database' => env('DB_DATABASE', 'forge'),
|
'database' => env('DB_DATABASE', 'forge'),
|
||||||
@@ -76,6 +88,7 @@ return [
|
|||||||
'password' => env('DB_PASSWORD', ''),
|
'password' => env('DB_PASSWORD', ''),
|
||||||
'charset' => 'utf8',
|
'charset' => 'utf8',
|
||||||
'prefix' => '',
|
'prefix' => '',
|
||||||
|
'prefix_indexes' => true,
|
||||||
],
|
],
|
||||||
|
|
||||||
],
|
],
|
||||||
@@ -99,20 +112,34 @@ return [
|
|||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Redis is an open source, fast, and advanced key-value store that also
|
| Redis is an open source, fast, and advanced key-value store that also
|
||||||
| provides a richer set of commands than a typical key-value systems
|
| provides a richer body of commands than a typical key-value system
|
||||||
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'redis' => [
|
'redis' => [
|
||||||
|
|
||||||
'client' => 'predis',
|
'client' => env('REDIS_CLIENT', 'phpredis'),
|
||||||
|
|
||||||
|
'options' => [
|
||||||
|
'cluster' => env('REDIS_CLUSTER', 'redis'),
|
||||||
|
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
|
||||||
|
],
|
||||||
|
|
||||||
'default' => [
|
'default' => [
|
||||||
|
'url' => env('REDIS_URL'),
|
||||||
'host' => env('REDIS_HOST', '127.0.0.1'),
|
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||||
'password' => env('REDIS_PASSWORD', null),
|
'password' => env('REDIS_PASSWORD', null),
|
||||||
'port' => env('REDIS_PORT', 6379),
|
'port' => env('REDIS_PORT', '6379'),
|
||||||
'database' => 0,
|
'database' => env('REDIS_DB', '0'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'cache' => [
|
||||||
|
'url' => env('REDIS_URL'),
|
||||||
|
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||||
|
'password' => env('REDIS_PASSWORD', null),
|
||||||
|
'port' => env('REDIS_PORT', '6379'),
|
||||||
|
'database' => env('REDIS_CACHE_DB', '1'),
|
||||||
],
|
],
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ return [
|
|||||||
| may even configure multiple disks of the same driver. Defaults have
|
| may even configure multiple disks of the same driver. Defaults have
|
||||||
| been setup for each driver as an example of the required options.
|
| been setup for each driver as an example of the required options.
|
||||||
|
|
|
|
||||||
| Supported Drivers: "local", "ftp", "sftp", "s3", "rackspace"
|
| Supported Drivers: "local", "ftp", "sftp", "s3"
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -62,8 +62,24 @@ return [
|
|||||||
'region' => env('AWS_DEFAULT_REGION'),
|
'region' => env('AWS_DEFAULT_REGION'),
|
||||||
'bucket' => env('AWS_BUCKET'),
|
'bucket' => env('AWS_BUCKET'),
|
||||||
'url' => env('AWS_URL'),
|
'url' => env('AWS_URL'),
|
||||||
|
'endpoint' => env('AWS_ENDPOINT'),
|
||||||
],
|
],
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Symbolic Links
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may configure the symbolic links that will be created when the
|
||||||
|
| `storage:link` Artisan command is executed. The array keys should be
|
||||||
|
| the locations of the links and the values should be their targets.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'links' => [
|
||||||
|
public_path('storage') => storage_path('app/public'),
|
||||||
|
],
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ return [
|
|||||||
| passwords for your application. By default, the bcrypt algorithm is
|
| passwords for your application. By default, the bcrypt algorithm is
|
||||||
| used; however, you remain free to modify this option if you wish.
|
| used; however, you remain free to modify this option if you wish.
|
||||||
|
|
|
|
||||||
| Supported: "bcrypt", "argon"
|
| Supported: "bcrypt", "argon", "argon2id"
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use Monolog\Handler\NullHandler;
|
||||||
use Monolog\Handler\StreamHandler;
|
use Monolog\Handler\StreamHandler;
|
||||||
|
use Monolog\Handler\SyslogUdpHandler;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
@@ -36,6 +38,7 @@ return [
|
|||||||
'stack' => [
|
'stack' => [
|
||||||
'driver' => 'stack',
|
'driver' => 'stack',
|
||||||
'channels' => ['single'],
|
'channels' => ['single'],
|
||||||
|
'ignore_exceptions' => false,
|
||||||
],
|
],
|
||||||
|
|
||||||
'single' => [
|
'single' => [
|
||||||
@@ -48,7 +51,7 @@ return [
|
|||||||
'driver' => 'daily',
|
'driver' => 'daily',
|
||||||
'path' => storage_path('logs/laravel.log'),
|
'path' => storage_path('logs/laravel.log'),
|
||||||
'level' => 'debug',
|
'level' => 'debug',
|
||||||
'days' => 7,
|
'days' => 14,
|
||||||
],
|
],
|
||||||
|
|
||||||
'slack' => [
|
'slack' => [
|
||||||
@@ -59,9 +62,20 @@ return [
|
|||||||
'level' => 'critical',
|
'level' => 'critical',
|
||||||
],
|
],
|
||||||
|
|
||||||
|
'papertrail' => [
|
||||||
|
'driver' => 'monolog',
|
||||||
|
'level' => 'debug',
|
||||||
|
'handler' => SyslogUdpHandler::class,
|
||||||
|
'handler_with' => [
|
||||||
|
'host' => env('PAPERTRAIL_URL'),
|
||||||
|
'port' => env('PAPERTRAIL_PORT'),
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
'stderr' => [
|
'stderr' => [
|
||||||
'driver' => 'monolog',
|
'driver' => 'monolog',
|
||||||
'handler' => StreamHandler::class,
|
'handler' => StreamHandler::class,
|
||||||
|
'formatter' => env('LOG_STDERR_FORMATTER'),
|
||||||
'with' => [
|
'with' => [
|
||||||
'stream' => 'php://stderr',
|
'stream' => 'php://stderr',
|
||||||
],
|
],
|
||||||
@@ -76,6 +90,15 @@ return [
|
|||||||
'driver' => 'errorlog',
|
'driver' => 'errorlog',
|
||||||
'level' => 'debug',
|
'level' => 'debug',
|
||||||
],
|
],
|
||||||
|
|
||||||
|
'null' => [
|
||||||
|
'driver' => 'monolog',
|
||||||
|
'handler' => NullHandler::class,
|
||||||
|
],
|
||||||
|
|
||||||
|
'emergency' => [
|
||||||
|
'path' => storage_path('logs/laravel.log'),
|
||||||
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -4,45 +4,73 @@ return [
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Mail Driver
|
| Default Mailer
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Laravel supports both SMTP and PHP's "mail" function as drivers for the
|
| This option controls the default mailer that is used to send any email
|
||||||
| sending of e-mail. You may specify which one you're using throughout
|
| messages sent by your application. Alternative mailers may be setup
|
||||||
| your application here. By default, Laravel is setup for SMTP mail.
|
| and used as needed; however, this mailer will be used by default.
|
||||||
|
|
|
||||||
| Supported: "smtp", "sendmail", "mailgun", "mandrill", "ses",
|
|
||||||
| "sparkpost", "log", "array"
|
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'driver' => env('MAIL_DRIVER', 'smtp'),
|
'default' => env('MAIL_MAILER', 'smtp'),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| SMTP Host Address
|
| Mailer Configurations
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Here you may provide the host address of the SMTP server used by your
|
| Here you may configure all of the mailers used by your application plus
|
||||||
| applications. A default option is provided that is compatible with
|
| their respective settings. Several examples have been configured for
|
||||||
| the Mailgun mail service which will provide reliable deliveries.
|
| you and you are free to add your own as your application requires.
|
||||||
|
|
|
||||||
|
| Laravel supports a variety of mail "transport" drivers to be used while
|
||||||
|
| sending an e-mail. You will specify which one you are using for your
|
||||||
|
| mailers below. You are free to add additional mailers as required.
|
||||||
|
|
|
||||||
|
| Supported: "smtp", "sendmail", "mailgun", "ses",
|
||||||
|
| "postmark", "log", "array"
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
|
'mailers' => [
|
||||||
|
'smtp' => [
|
||||||
|
'transport' => 'smtp',
|
||||||
|
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
|
||||||
|
'port' => env('MAIL_PORT', 587),
|
||||||
|
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
|
||||||
|
'username' => env('MAIL_USERNAME'),
|
||||||
|
'password' => env('MAIL_PASSWORD'),
|
||||||
|
'timeout' => null,
|
||||||
|
'auth_mode' => null,
|
||||||
|
],
|
||||||
|
|
||||||
/*
|
'ses' => [
|
||||||
|--------------------------------------------------------------------------
|
'transport' => 'ses',
|
||||||
| SMTP Host Port
|
],
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This is the SMTP port used by your application to deliver e-mails to
|
|
||||||
| users of the application. Like the host we have set this value to
|
|
||||||
| stay compatible with the Mailgun e-mail application by default.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'port' => env('MAIL_PORT', 587),
|
'mailgun' => [
|
||||||
|
'transport' => 'mailgun',
|
||||||
|
],
|
||||||
|
|
||||||
|
'postmark' => [
|
||||||
|
'transport' => 'postmark',
|
||||||
|
],
|
||||||
|
|
||||||
|
'sendmail' => [
|
||||||
|
'transport' => 'sendmail',
|
||||||
|
'path' => '/usr/sbin/sendmail -bs',
|
||||||
|
],
|
||||||
|
|
||||||
|
'log' => [
|
||||||
|
'transport' => 'log',
|
||||||
|
'channel' => env('MAIL_LOG_CHANNEL'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'array' => [
|
||||||
|
'transport' => 'array',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@@ -60,47 +88,6 @@ return [
|
|||||||
'name' => env('MAIL_FROM_NAME', 'Example'),
|
'name' => env('MAIL_FROM_NAME', 'Example'),
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| E-Mail Encryption Protocol
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Here you may specify the encryption protocol that should be used when
|
|
||||||
| the application send e-mail messages. A sensible default using the
|
|
||||||
| transport layer security protocol should provide great security.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| SMTP Server Username
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| If your SMTP server requires a username for authentication, you should
|
|
||||||
| set it here. This will get used to authenticate with your server on
|
|
||||||
| connection. You may also set the "password" value below this one.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'username' => env('MAIL_USERNAME'),
|
|
||||||
|
|
||||||
'password' => env('MAIL_PASSWORD'),
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Sendmail System Path
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| When using the "sendmail" driver to send e-mails, we will need to know
|
|
||||||
| the path to where Sendmail lives on this server. A default path has
|
|
||||||
| been provided here, which will work well on most of your systems.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'sendmail' => '/usr/sbin/sendmail -bs',
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Markdown Mail Settings
|
| Markdown Mail Settings
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ return [
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'default' => env('QUEUE_DRIVER', 'sync'),
|
'default' => env('QUEUE_CONNECTION', 'sync'),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@@ -46,21 +46,23 @@ return [
|
|||||||
'host' => 'localhost',
|
'host' => 'localhost',
|
||||||
'queue' => 'default',
|
'queue' => 'default',
|
||||||
'retry_after' => 90,
|
'retry_after' => 90,
|
||||||
|
'block_for' => 0,
|
||||||
],
|
],
|
||||||
|
|
||||||
'sqs' => [
|
'sqs' => [
|
||||||
'driver' => 'sqs',
|
'driver' => 'sqs',
|
||||||
'key' => env('SQS_KEY', 'your-public-key'),
|
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||||
'secret' => env('SQS_SECRET', 'your-secret-key'),
|
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||||
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
|
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
|
||||||
'queue' => env('SQS_QUEUE', 'your-queue-name'),
|
'queue' => env('SQS_QUEUE', 'your-queue-name'),
|
||||||
'region' => env('SQS_REGION', 'us-east-1'),
|
'suffix' => env('SQS_SUFFIX'),
|
||||||
|
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||||
],
|
],
|
||||||
|
|
||||||
'redis' => [
|
'redis' => [
|
||||||
'driver' => 'redis',
|
'driver' => 'redis',
|
||||||
'connection' => 'default',
|
'connection' => 'default',
|
||||||
'queue' => 'default',
|
'queue' => env('REDIS_QUEUE', 'default'),
|
||||||
'retry_after' => 90,
|
'retry_after' => 90,
|
||||||
'block_for' => null,
|
'block_for' => null,
|
||||||
],
|
],
|
||||||
@@ -79,6 +81,7 @@ return [
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
'failed' => [
|
'failed' => [
|
||||||
|
'driver' => env('QUEUE_FAILED_DRIVER', 'database'),
|
||||||
'database' => env('DB_CONNECTION', 'mysql'),
|
'database' => env('DB_CONNECTION', 'mysql'),
|
||||||
'table' => 'failed_jobs',
|
'table' => 'failed_jobs',
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -8,31 +8,26 @@ return [
|
|||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| This file is for storing the credentials for third party services such
|
| This file is for storing the credentials for third party services such
|
||||||
| as Stripe, Mailgun, SparkPost and others. This file provides a sane
|
| as Mailgun, Postmark, AWS and more. This file provides the de facto
|
||||||
| default location for this type of information, allowing packages
|
| location for this type of information, allowing packages to have
|
||||||
| to have a conventional place to find your various credentials.
|
| a conventional file to locate the various service credentials.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'mailgun' => [
|
'mailgun' => [
|
||||||
'domain' => env('MAILGUN_DOMAIN'),
|
'domain' => env('MAILGUN_DOMAIN'),
|
||||||
'secret' => env('MAILGUN_SECRET'),
|
'secret' => env('MAILGUN_SECRET'),
|
||||||
|
'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'postmark' => [
|
||||||
|
'token' => env('POSTMARK_TOKEN'),
|
||||||
],
|
],
|
||||||
|
|
||||||
'ses' => [
|
'ses' => [
|
||||||
'key' => env('SES_KEY'),
|
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||||
'secret' => env('SES_SECRET'),
|
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||||
'region' => env('SES_REGION', 'us-east-1'),
|
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||||
],
|
|
||||||
|
|
||||||
'sparkpost' => [
|
|
||||||
'secret' => env('SPARKPOST_SECRET'),
|
|
||||||
],
|
|
||||||
|
|
||||||
'stripe' => [
|
|
||||||
'model' => App\User::class,
|
|
||||||
'key' => env('STRIPE_KEY'),
|
|
||||||
'secret' => env('STRIPE_SECRET'),
|
|
||||||
],
|
],
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -12,7 +14,7 @@ return [
|
|||||||
| you may specify any of the other wonderful drivers provided here.
|
| you may specify any of the other wonderful drivers provided here.
|
||||||
|
|
|
|
||||||
| Supported: "file", "cookie", "database", "apc",
|
| Supported: "file", "cookie", "database", "apc",
|
||||||
| "memcached", "redis", "array"
|
| "memcached", "redis", "dynamodb", "array"
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -70,7 +72,7 @@ return [
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'connection' => null,
|
'connection' => env('SESSION_CONNECTION', null),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@@ -90,13 +92,13 @@ return [
|
|||||||
| Session Cache Store
|
| Session Cache Store
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| When using the "apc" or "memcached" session drivers, you may specify a
|
| When using the "apc", "memcached", or "dynamodb" session drivers you may
|
||||||
| cache store that should be used for these sessions. This value must
|
| list a cache store that should be used for these sessions. This value
|
||||||
| correspond with one of the application's configured cache stores.
|
| must match with one of the application's configured cache "stores".
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'store' => null,
|
'store' => env('SESSION_STORE', null),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@@ -124,7 +126,7 @@ return [
|
|||||||
|
|
||||||
'cookie' => env(
|
'cookie' => env(
|
||||||
'SESSION_COOKIE',
|
'SESSION_COOKIE',
|
||||||
str_slug(env('APP_NAME', 'laravel'), '_').'_session'
|
Str::slug(env('APP_NAME', 'laravel'), '_').'_session'
|
||||||
),
|
),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -164,7 +166,7 @@ return [
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'secure' => env('SESSION_SECURE_COOKIE', false),
|
'secure' => env('SESSION_SECURE_COOKIE'),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@@ -186,12 +188,12 @@ return [
|
|||||||
|
|
|
|
||||||
| This option determines how your cookies behave when cross-site requests
|
| This option determines how your cookies behave when cross-site requests
|
||||||
| take place, and can be used to mitigate CSRF attacks. By default, we
|
| take place, and can be used to mitigate CSRF attacks. By default, we
|
||||||
| do not enable this as other CSRF protection services are in place.
|
| will set this value to "lax" since this is a secure default value.
|
||||||
|
|
|
|
||||||
| Supported: "lax", "strict"
|
| Supported: "lax", "strict", "none", null
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'same_site' => null,
|
'same_site' => 'lax',
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -28,6 +28,9 @@ return [
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'compiled' => realpath(storage_path('framework/views')),
|
'compiled' => env(
|
||||||
|
'VIEW_COMPILED_PATH',
|
||||||
|
realpath(storage_path('framework/views'))
|
||||||
|
),
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
/** @var \Illuminate\Database\Eloquent\Factory $factory */
|
||||||
|
|
||||||
|
use App\User;
|
||||||
use Faker\Generator as Faker;
|
use Faker\Generator as Faker;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@@ -13,11 +17,12 @@ use Faker\Generator as Faker;
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$factory->define(App\User::class, function (Faker $faker) {
|
$factory->define(User::class, function (Faker $faker) {
|
||||||
return [
|
return [
|
||||||
'name' => $faker->name,
|
'name' => $faker->name,
|
||||||
'email' => $faker->unique()->safeEmail,
|
'email' => $faker->unique()->safeEmail,
|
||||||
'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret
|
'email_verified_at' => now(),
|
||||||
'remember_token' => str_random(10),
|
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
|
||||||
|
'remember_token' => Str::random(10),
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
*.sqlite
|
*.sqlite
|
||||||
|
*.sqlite-journal
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
class CreateUsersTable extends Migration
|
class CreateUsersTable extends Migration
|
||||||
{
|
{
|
||||||
@@ -14,9 +14,10 @@ class CreateUsersTable extends Migration
|
|||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::create('users', function (Blueprint $table) {
|
Schema::create('users', function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->id();
|
||||||
$table->string('name');
|
$table->string('name');
|
||||||
$table->string('email')->unique();
|
$table->string('email')->unique();
|
||||||
|
$table->timestamp('email_verified_at')->nullable();
|
||||||
$table->string('password');
|
$table->string('password');
|
||||||
$table->rememberToken();
|
$table->rememberToken();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
|
|
||||||
class CreatePasswordResetsTable extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::create('password_resets', function (Blueprint $table) {
|
|
||||||
$table->string('email')->index();
|
|
||||||
$table->string('token');
|
|
||||||
$table->timestamp('created_at')->nullable();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::dropIfExists('password_resets');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class CreateFailedJobsTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('failed_jobs', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->text('connection');
|
||||||
|
$table->text('queue');
|
||||||
|
$table->longText('payload');
|
||||||
|
$table->longText('exception');
|
||||||
|
$table->timestamp('failed_at')->useCurrent();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('failed_jobs');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,6 +11,6 @@ class DatabaseSeeder extends Seeder
|
|||||||
*/
|
*/
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
// $this->call(UsersTableSeeder::class);
|
// $this->call(UserSeeder::class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
|
||||||
|
[*.{yml,yaml}]
|
||||||
|
indent_size = 2
|
||||||
@@ -9,26 +9,33 @@ LOG_CHANNEL=stack
|
|||||||
DB_CONNECTION=mysql
|
DB_CONNECTION=mysql
|
||||||
DB_HOST=127.0.0.1
|
DB_HOST=127.0.0.1
|
||||||
DB_PORT=3306
|
DB_PORT=3306
|
||||||
DB_DATABASE=homestead
|
DB_DATABASE=laravel
|
||||||
DB_USERNAME=homestead
|
DB_USERNAME=root
|
||||||
DB_PASSWORD=secret
|
DB_PASSWORD=
|
||||||
|
|
||||||
BROADCAST_DRIVER=log
|
BROADCAST_DRIVER=log
|
||||||
CACHE_DRIVER=file
|
CACHE_DRIVER=file
|
||||||
|
QUEUE_CONNECTION=sync
|
||||||
SESSION_DRIVER=file
|
SESSION_DRIVER=file
|
||||||
SESSION_LIFETIME=120
|
SESSION_LIFETIME=120
|
||||||
QUEUE_DRIVER=sync
|
|
||||||
|
|
||||||
REDIS_HOST=127.0.0.1
|
REDIS_HOST=127.0.0.1
|
||||||
REDIS_PASSWORD=null
|
REDIS_PASSWORD=null
|
||||||
REDIS_PORT=6379
|
REDIS_PORT=6379
|
||||||
|
|
||||||
MAIL_DRIVER=smtp
|
MAIL_MAILER=smtp
|
||||||
MAIL_HOST=smtp.mailtrap.io
|
MAIL_HOST=smtp.mailtrap.io
|
||||||
MAIL_PORT=2525
|
MAIL_PORT=2525
|
||||||
MAIL_USERNAME=null
|
MAIL_USERNAME=null
|
||||||
MAIL_PASSWORD=null
|
MAIL_PASSWORD=null
|
||||||
MAIL_ENCRYPTION=null
|
MAIL_ENCRYPTION=null
|
||||||
|
MAIL_FROM_ADDRESS=null
|
||||||
|
MAIL_FROM_NAME="${APP_NAME}"
|
||||||
|
|
||||||
|
AWS_ACCESS_KEY_ID=
|
||||||
|
AWS_SECRET_ACCESS_KEY=
|
||||||
|
AWS_DEFAULT_REGION=us-east-1
|
||||||
|
AWS_BUCKET=
|
||||||
|
|
||||||
PUSHER_APP_ID=
|
PUSHER_APP_ID=
|
||||||
PUSHER_APP_KEY=
|
PUSHER_APP_KEY=
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
* text=auto
|
||||||
|
*.css linguist-vendored
|
||||||
|
*.scss linguist-vendored
|
||||||
|
*.js linguist-vendored
|
||||||
|
CHANGELOG.md export-ignore
|
||||||
@@ -1,19 +1,16 @@
|
|||||||
# ref: https://github.com/github/gitignore/blob/master/Laravel.gitignore
|
/node_modules
|
||||||
|
/public/hot
|
||||||
vendor/
|
/public/storage
|
||||||
node_modules/
|
/storage/*.key
|
||||||
|
/vendor
|
||||||
|
.env
|
||||||
|
.env.backup
|
||||||
|
.phpunit.result.cache
|
||||||
|
Homestead.json
|
||||||
|
Homestead.yaml
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
yarn-error.log
|
yarn-error.log
|
||||||
|
|
||||||
# Laravel 4 specific
|
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
|
||||||
bootstrap/compiled.php
|
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
|
||||||
app/storage/
|
composer.lock
|
||||||
|
|
||||||
# Laravel 5 & Lumen specific
|
|
||||||
public/storage
|
|
||||||
public/hot
|
|
||||||
storage/*.key
|
|
||||||
.env
|
|
||||||
Homestead.yaml
|
|
||||||
Homestead.json
|
|
||||||
/.vagrant
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* {{{appName}}}
|
* {{{appName}}}
|
||||||
* {{{appDescription}}}
|
* {{{appDescription}}}
|
||||||
* PHP version 7.1.3
|
* PHP version 7.2.5
|
||||||
*
|
*
|
||||||
* {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}}
|
* {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}}
|
||||||
* {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}}
|
* {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}}
|
||||||
|
|||||||
@@ -5,18 +5,17 @@
|
|||||||
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
|
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
|
||||||
"watch": "npm run development -- --watch",
|
"watch": "npm run development -- --watch",
|
||||||
"watch-poll": "npm run watch -- --watch-poll",
|
"watch-poll": "npm run watch -- --watch-poll",
|
||||||
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
|
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --disable-host-check --config=node_modules/laravel-mix/setup/webpack.config.js",
|
||||||
"prod": "npm run production",
|
"prod": "npm run production",
|
||||||
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
|
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"axios": "^0.18",
|
"axios": "^0.19",
|
||||||
"bootstrap": "^4.0.0",
|
"cross-env": "^7.0",
|
||||||
"popper.js": "^1.12",
|
"laravel-mix": "^5.0.1",
|
||||||
"cross-env": "^5.1",
|
"lodash": "^4.17.13",
|
||||||
"jquery": "^3.2",
|
"resolve-url-loader": "^3.1.0",
|
||||||
"laravel-mix": "^2.0",
|
"sass": "^1.15.2",
|
||||||
"lodash": "^4.17.4",
|
"sass-loader": "^8.0.0"
|
||||||
"vue": "^2.5.7"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,21 +1,16 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<phpunit backupGlobals="false"
|
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
backupStaticAttributes="false"
|
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
|
||||||
bootstrap="vendor/autoload.php"
|
bootstrap="vendor/autoload.php"
|
||||||
colors="true"
|
colors="true"
|
||||||
convertErrorsToExceptions="true"
|
>
|
||||||
convertNoticesToExceptions="true"
|
|
||||||
convertWarningsToExceptions="true"
|
|
||||||
processIsolation="false"
|
|
||||||
stopOnFailure="false">
|
|
||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite name="Feature">
|
|
||||||
<directory suffix="Test.php">./tests/Feature</directory>
|
|
||||||
</testsuite>
|
|
||||||
|
|
||||||
<testsuite name="Unit">
|
<testsuite name="Unit">
|
||||||
<directory suffix="Test.php">./tests/Unit</directory>
|
<directory suffix="Test.php">./tests/Unit</directory>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
|
<testsuite name="Feature">
|
||||||
|
<directory suffix="Test.php">./tests/Feature</directory>
|
||||||
|
</testsuite>
|
||||||
</testsuites>
|
</testsuites>
|
||||||
<filter>
|
<filter>
|
||||||
<whitelist processUncoveredFilesFromWhitelist="true">
|
<whitelist processUncoveredFilesFromWhitelist="true">
|
||||||
@@ -23,12 +18,14 @@
|
|||||||
</whitelist>
|
</whitelist>
|
||||||
</filter>
|
</filter>
|
||||||
<php>
|
<php>
|
||||||
<ini name="error_reporting" value="E_ALL" />
|
<server name="APP_ENV" value="testing"/>
|
||||||
<env name="APP_ENV" value="testing"/>
|
<server name="BCRYPT_ROUNDS" value="4"/>
|
||||||
<env name="BCRYPT_ROUNDS" value="4"/>
|
<server name="CACHE_DRIVER" value="array"/>
|
||||||
<env name="CACHE_DRIVER" value="array"/>
|
<server name="DB_CONNECTION" value="sqlite"/>
|
||||||
<env name="SESSION_DRIVER" value="array"/>
|
<server name="DB_DATABASE" value=":memory:"/>
|
||||||
<env name="QUEUE_DRIVER" value="sync"/>
|
<server name="MAIL_MAILER" value="array"/>
|
||||||
<env name="MAIL_DRIVER" value="array"/>
|
<server name="QUEUE_CONNECTION" value="sync"/>
|
||||||
|
<server name="SESSION_DRIVER" value="array"/>
|
||||||
|
<server name="TELESCOPE_ENABLED" value="false"/>
|
||||||
</php>
|
</php>
|
||||||
</phpunit>
|
</phpunit>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
RewriteCond %{REQUEST_URI} (.+)/$
|
RewriteCond %{REQUEST_URI} (.+)/$
|
||||||
RewriteRule ^ %1 [L,R=301]
|
RewriteRule ^ %1 [L,R=301]
|
||||||
|
|
||||||
# Handle Front Controller...
|
# Send Requests To Front Controller...
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
RewriteRule ^ index.php [L]
|
RewriteRule ^ index.php [L]
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,3 +1,8 @@
|
|||||||
|
<!--
|
||||||
|
Rewrites requires Microsoft URL Rewrite Module for IIS
|
||||||
|
Download: https://www.microsoft.com/en-us/download/details.aspx?id=47337
|
||||||
|
Debug Help: https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/using-failed-request-tracing-to-trace-rewrite-rules
|
||||||
|
-->
|
||||||
<configuration>
|
<configuration>
|
||||||
<system.webServer>
|
<system.webServer>
|
||||||
<rewrite>
|
<rewrite>
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
|
|
||||||
/**
|
|
||||||
* First we will load all of this project's JavaScript dependencies which
|
|
||||||
* includes Vue and other libraries. It is a great starting point when
|
|
||||||
* building robust, powerful web applications using Vue and Laravel.
|
|
||||||
*/
|
|
||||||
|
|
||||||
require('./bootstrap');
|
|
||||||
|
|
||||||
window.Vue = require('vue');
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Next, we will create a fresh Vue application instance and attach it to
|
|
||||||
* the page. Then, you may begin adding components to this application
|
|
||||||
* or customize the JavaScript scaffolding to fit your unique needs.
|
|
||||||
*/
|
|
||||||
|
|
||||||
Vue.component('example-component', require('./components/ExampleComponent.vue'));
|
|
||||||
|
|
||||||
const app = new Vue({
|
|
||||||
el: '#app'
|
|
||||||
});
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
|
|
||||||
window._ = require('lodash');
|
|
||||||
window.Popper = require('popper.js').default;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* We'll load jQuery and the Bootstrap jQuery plugin which provides support
|
|
||||||
* for JavaScript based Bootstrap features such as modals and tabs. This
|
|
||||||
* code may be modified to fit the specific needs of your application.
|
|
||||||
*/
|
|
||||||
|
|
||||||
try {
|
|
||||||
window.$ = window.jQuery = require('jquery');
|
|
||||||
|
|
||||||
require('bootstrap');
|
|
||||||
} catch (e) {}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* We'll load the axios HTTP library which allows us to easily issue requests
|
|
||||||
* to our Laravel back-end. This library automatically handles sending the
|
|
||||||
* CSRF token as a header based on the value of the "XSRF" token cookie.
|
|
||||||
*/
|
|
||||||
|
|
||||||
window.axios = require('axios');
|
|
||||||
|
|
||||||
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Next we will register the CSRF Token as a common header with Axios so that
|
|
||||||
* all outgoing HTTP requests automatically have it attached. This is just
|
|
||||||
* a simple convenience so we don't have to attach every token manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
let token = document.head.querySelector('meta[name="csrf-token"]');
|
|
||||||
|
|
||||||
if (token) {
|
|
||||||
window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
|
|
||||||
} else {
|
|
||||||
console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Echo exposes an expressive API for subscribing to channels and listening
|
|
||||||
* for events that are broadcast by Laravel. Echo and event broadcasting
|
|
||||||
* allows your team to easily build robust real-time web applications.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// import Echo from 'laravel-echo'
|
|
||||||
|
|
||||||
// window.Pusher = require('pusher-js');
|
|
||||||
|
|
||||||
// window.Echo = new Echo({
|
|
||||||
// broadcaster: 'pusher',
|
|
||||||
// key: process.env.MIX_PUSHER_APP_KEY,
|
|
||||||
// cluster: process.env.MIX_PUSHER_APP_CLUSTER,
|
|
||||||
// encrypted: true
|
|
||||||
// });
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="container">
|
|
||||||
<div class="row justify-content-center">
|
|
||||||
<div class="col-md-8">
|
|
||||||
<div class="card card-default">
|
|
||||||
<div class="card-header">Example Component</div>
|
|
||||||
|
|
||||||
<div class="card-body">
|
|
||||||
I'm an example component.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
mounted() {
|
|
||||||
console.log('Component mounted.')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
|
|
||||||
// Body
|
|
||||||
$body-bg: #f5f8fa;
|
|
||||||
|
|
||||||
// Typography
|
|
||||||
$font-family-sans-serif: "Raleway", sans-serif;
|
|
||||||
$font-size-base: 0.9rem;
|
|
||||||
$line-height-base: 1.6;
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
|
|
||||||
// Fonts
|
|
||||||
@import url("https://fonts.googleapis.com/css?family=Raleway:300,400,600");
|
|
||||||
|
|
||||||
// Variables
|
|
||||||
@import "variables";
|
|
||||||
|
|
||||||
// Bootstrap
|
|
||||||
@import '~bootstrap/scss/bootstrap';
|
|
||||||
|
|
||||||
.navbar-laravel {
|
|
||||||
background-color: #fff;
|
|
||||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
|
|
||||||
}
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
require('./bootstrap');
|
||||||
28
modules/openapi-generator/src/main/resources/php-laravel/resources/js/bootstrap.js
vendored
Normal file
28
modules/openapi-generator/src/main/resources/php-laravel/resources/js/bootstrap.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
window._ = require('lodash');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* We'll load the axios HTTP library which allows us to easily issue requests
|
||||||
|
* to our Laravel back-end. This library automatically handles sending the
|
||||||
|
* CSRF token as a header based on the value of the "XSRF" token cookie.
|
||||||
|
*/
|
||||||
|
|
||||||
|
window.axios = require('axios');
|
||||||
|
|
||||||
|
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Echo exposes an expressive API for subscribing to channels and listening
|
||||||
|
* for events that are broadcast by Laravel. Echo and event broadcasting
|
||||||
|
* allows your team to easily build robust real-time web applications.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// import Echo from 'laravel-echo';
|
||||||
|
|
||||||
|
// window.Pusher = require('pusher-js');
|
||||||
|
|
||||||
|
// window.Echo = new Echo({
|
||||||
|
// broadcaster: 'pusher',
|
||||||
|
// key: process.env.MIX_PUSHER_APP_KEY,
|
||||||
|
// cluster: process.env.MIX_PUSHER_APP_CLUSTER,
|
||||||
|
// forceTLS: true
|
||||||
|
// });
|
||||||
@@ -13,10 +13,10 @@ return [
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'password' => 'Passwords must be at least six characters and match the confirmation.',
|
|
||||||
'reset' => 'Your password has been reset!',
|
'reset' => 'Your password has been reset!',
|
||||||
'sent' => 'We have e-mailed your password reset link!',
|
'sent' => 'We have emailed your password reset link!',
|
||||||
|
'throttled' => 'Please wait before retrying.',
|
||||||
'token' => 'This password reset token is invalid.',
|
'token' => 'This password reset token is invalid.',
|
||||||
'user' => "We can't find a user with that e-mail address.",
|
'user' => "We can't find a user with that email address.",
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -13,105 +13,110 @@ return [
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'accepted' => 'The :attribute must be accepted.',
|
'accepted' => 'The :attribute must be accepted.',
|
||||||
'active_url' => 'The :attribute is not a valid URL.',
|
'active_url' => 'The :attribute is not a valid URL.',
|
||||||
'after' => 'The :attribute must be a date after :date.',
|
'after' => 'The :attribute must be a date after :date.',
|
||||||
'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
|
'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
|
||||||
'alpha' => 'The :attribute may only contain letters.',
|
'alpha' => 'The :attribute may only contain letters.',
|
||||||
'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.',
|
'alpha_dash' => 'The :attribute may only contain letters, numbers, dashes and underscores.',
|
||||||
'alpha_num' => 'The :attribute may only contain letters and numbers.',
|
'alpha_num' => 'The :attribute may only contain letters and numbers.',
|
||||||
'array' => 'The :attribute must be an array.',
|
'array' => 'The :attribute must be an array.',
|
||||||
'before' => 'The :attribute must be a date before :date.',
|
'before' => 'The :attribute must be a date before :date.',
|
||||||
'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
|
'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
|
||||||
'between' => [
|
'between' => [
|
||||||
'numeric' => 'The :attribute must be between :min and :max.',
|
'numeric' => 'The :attribute must be between :min and :max.',
|
||||||
'file' => 'The :attribute must be between :min and :max kilobytes.',
|
'file' => 'The :attribute must be between :min and :max kilobytes.',
|
||||||
'string' => 'The :attribute must be between :min and :max characters.',
|
'string' => 'The :attribute must be between :min and :max characters.',
|
||||||
'array' => 'The :attribute must have between :min and :max items.',
|
'array' => 'The :attribute must have between :min and :max items.',
|
||||||
],
|
],
|
||||||
'boolean' => 'The :attribute field must be true or false.',
|
'boolean' => 'The :attribute field must be true or false.',
|
||||||
'confirmed' => 'The :attribute confirmation does not match.',
|
'confirmed' => 'The :attribute confirmation does not match.',
|
||||||
'date' => 'The :attribute is not a valid date.',
|
'date' => 'The :attribute is not a valid date.',
|
||||||
'date_format' => 'The :attribute does not match the format :format.',
|
'date_equals' => 'The :attribute must be a date equal to :date.',
|
||||||
'different' => 'The :attribute and :other must be different.',
|
'date_format' => 'The :attribute does not match the format :format.',
|
||||||
'digits' => 'The :attribute must be :digits digits.',
|
'different' => 'The :attribute and :other must be different.',
|
||||||
'digits_between' => 'The :attribute must be between :min and :max digits.',
|
'digits' => 'The :attribute must be :digits digits.',
|
||||||
'dimensions' => 'The :attribute has invalid image dimensions.',
|
'digits_between' => 'The :attribute must be between :min and :max digits.',
|
||||||
'distinct' => 'The :attribute field has a duplicate value.',
|
'dimensions' => 'The :attribute has invalid image dimensions.',
|
||||||
'email' => 'The :attribute must be a valid email address.',
|
'distinct' => 'The :attribute field has a duplicate value.',
|
||||||
'exists' => 'The selected :attribute is invalid.',
|
'email' => 'The :attribute must be a valid email address.',
|
||||||
'file' => 'The :attribute must be a file.',
|
'ends_with' => 'The :attribute must end with one of the following: :values.',
|
||||||
'filled' => 'The :attribute field must have a value.',
|
'exists' => 'The selected :attribute is invalid.',
|
||||||
'gt' => [
|
'file' => 'The :attribute must be a file.',
|
||||||
|
'filled' => 'The :attribute field must have a value.',
|
||||||
|
'gt' => [
|
||||||
'numeric' => 'The :attribute must be greater than :value.',
|
'numeric' => 'The :attribute must be greater than :value.',
|
||||||
'file' => 'The :attribute must be greater than :value kilobytes.',
|
'file' => 'The :attribute must be greater than :value kilobytes.',
|
||||||
'string' => 'The :attribute must be greater than :value characters.',
|
'string' => 'The :attribute must be greater than :value characters.',
|
||||||
'array' => 'The :attribute must have more than :value items.',
|
'array' => 'The :attribute must have more than :value items.',
|
||||||
],
|
],
|
||||||
'gte' => [
|
'gte' => [
|
||||||
'numeric' => 'The :attribute must be greater than or equal :value.',
|
'numeric' => 'The :attribute must be greater than or equal :value.',
|
||||||
'file' => 'The :attribute must be greater than or equal :value kilobytes.',
|
'file' => 'The :attribute must be greater than or equal :value kilobytes.',
|
||||||
'string' => 'The :attribute must be greater than or equal :value characters.',
|
'string' => 'The :attribute must be greater than or equal :value characters.',
|
||||||
'array' => 'The :attribute must have :value items or more.',
|
'array' => 'The :attribute must have :value items or more.',
|
||||||
],
|
],
|
||||||
'image' => 'The :attribute must be an image.',
|
'image' => 'The :attribute must be an image.',
|
||||||
'in' => 'The selected :attribute is invalid.',
|
'in' => 'The selected :attribute is invalid.',
|
||||||
'in_array' => 'The :attribute field does not exist in :other.',
|
'in_array' => 'The :attribute field does not exist in :other.',
|
||||||
'integer' => 'The :attribute must be an integer.',
|
'integer' => 'The :attribute must be an integer.',
|
||||||
'ip' => 'The :attribute must be a valid IP address.',
|
'ip' => 'The :attribute must be a valid IP address.',
|
||||||
'ipv4' => 'The :attribute must be a valid IPv4 address.',
|
'ipv4' => 'The :attribute must be a valid IPv4 address.',
|
||||||
'ipv6' => 'The :attribute must be a valid IPv6 address.',
|
'ipv6' => 'The :attribute must be a valid IPv6 address.',
|
||||||
'json' => 'The :attribute must be a valid JSON string.',
|
'json' => 'The :attribute must be a valid JSON string.',
|
||||||
'lt' => [
|
'lt' => [
|
||||||
'numeric' => 'The :attribute must be less than :value.',
|
'numeric' => 'The :attribute must be less than :value.',
|
||||||
'file' => 'The :attribute must be less than :value kilobytes.',
|
'file' => 'The :attribute must be less than :value kilobytes.',
|
||||||
'string' => 'The :attribute must be less than :value characters.',
|
'string' => 'The :attribute must be less than :value characters.',
|
||||||
'array' => 'The :attribute must have less than :value items.',
|
'array' => 'The :attribute must have less than :value items.',
|
||||||
],
|
],
|
||||||
'lte' => [
|
'lte' => [
|
||||||
'numeric' => 'The :attribute must be less than or equal :value.',
|
'numeric' => 'The :attribute must be less than or equal :value.',
|
||||||
'file' => 'The :attribute must be less than or equal :value kilobytes.',
|
'file' => 'The :attribute must be less than or equal :value kilobytes.',
|
||||||
'string' => 'The :attribute must be less than or equal :value characters.',
|
'string' => 'The :attribute must be less than or equal :value characters.',
|
||||||
'array' => 'The :attribute must not have more than :value items.',
|
'array' => 'The :attribute must not have more than :value items.',
|
||||||
],
|
],
|
||||||
'max' => [
|
'max' => [
|
||||||
'numeric' => 'The :attribute may not be greater than :max.',
|
'numeric' => 'The :attribute may not be greater than :max.',
|
||||||
'file' => 'The :attribute may not be greater than :max kilobytes.',
|
'file' => 'The :attribute may not be greater than :max kilobytes.',
|
||||||
'string' => 'The :attribute may not be greater than :max characters.',
|
'string' => 'The :attribute may not be greater than :max characters.',
|
||||||
'array' => 'The :attribute may not have more than :max items.',
|
'array' => 'The :attribute may not have more than :max items.',
|
||||||
],
|
],
|
||||||
'mimes' => 'The :attribute must be a file of type: :values.',
|
'mimes' => 'The :attribute must be a file of type: :values.',
|
||||||
'mimetypes' => 'The :attribute must be a file of type: :values.',
|
'mimetypes' => 'The :attribute must be a file of type: :values.',
|
||||||
'min' => [
|
'min' => [
|
||||||
'numeric' => 'The :attribute must be at least :min.',
|
'numeric' => 'The :attribute must be at least :min.',
|
||||||
'file' => 'The :attribute must be at least :min kilobytes.',
|
'file' => 'The :attribute must be at least :min kilobytes.',
|
||||||
'string' => 'The :attribute must be at least :min characters.',
|
'string' => 'The :attribute must be at least :min characters.',
|
||||||
'array' => 'The :attribute must have at least :min items.',
|
'array' => 'The :attribute must have at least :min items.',
|
||||||
],
|
],
|
||||||
'not_in' => 'The selected :attribute is invalid.',
|
'not_in' => 'The selected :attribute is invalid.',
|
||||||
'not_regex' => 'The :attribute format is invalid.',
|
'not_regex' => 'The :attribute format is invalid.',
|
||||||
'numeric' => 'The :attribute must be a number.',
|
'numeric' => 'The :attribute must be a number.',
|
||||||
'present' => 'The :attribute field must be present.',
|
'password' => 'The password is incorrect.',
|
||||||
'regex' => 'The :attribute format is invalid.',
|
'present' => 'The :attribute field must be present.',
|
||||||
'required' => 'The :attribute field is required.',
|
'regex' => 'The :attribute format is invalid.',
|
||||||
'required_if' => 'The :attribute field is required when :other is :value.',
|
'required' => 'The :attribute field is required.',
|
||||||
'required_unless' => 'The :attribute field is required unless :other is in :values.',
|
'required_if' => 'The :attribute field is required when :other is :value.',
|
||||||
'required_with' => 'The :attribute field is required when :values is present.',
|
'required_unless' => 'The :attribute field is required unless :other is in :values.',
|
||||||
'required_with_all' => 'The :attribute field is required when :values is present.',
|
'required_with' => 'The :attribute field is required when :values is present.',
|
||||||
'required_without' => 'The :attribute field is required when :values is not present.',
|
'required_with_all' => 'The :attribute field is required when :values are present.',
|
||||||
|
'required_without' => 'The :attribute field is required when :values is not present.',
|
||||||
'required_without_all' => 'The :attribute field is required when none of :values are present.',
|
'required_without_all' => 'The :attribute field is required when none of :values are present.',
|
||||||
'same' => 'The :attribute and :other must match.',
|
'same' => 'The :attribute and :other must match.',
|
||||||
'size' => [
|
'size' => [
|
||||||
'numeric' => 'The :attribute must be :size.',
|
'numeric' => 'The :attribute must be :size.',
|
||||||
'file' => 'The :attribute must be :size kilobytes.',
|
'file' => 'The :attribute must be :size kilobytes.',
|
||||||
'string' => 'The :attribute must be :size characters.',
|
'string' => 'The :attribute must be :size characters.',
|
||||||
'array' => 'The :attribute must contain :size items.',
|
'array' => 'The :attribute must contain :size items.',
|
||||||
],
|
],
|
||||||
'string' => 'The :attribute must be a string.',
|
'starts_with' => 'The :attribute must start with one of the following: :values.',
|
||||||
'timezone' => 'The :attribute must be a valid zone.',
|
'string' => 'The :attribute must be a string.',
|
||||||
'unique' => 'The :attribute has already been taken.',
|
'timezone' => 'The :attribute must be a valid zone.',
|
||||||
'uploaded' => 'The :attribute failed to upload.',
|
'unique' => 'The :attribute has already been taken.',
|
||||||
'url' => 'The :attribute format is invalid.',
|
'uploaded' => 'The :attribute failed to upload.',
|
||||||
|
'url' => 'The :attribute format is invalid.',
|
||||||
|
'uuid' => 'The :attribute must be a valid UUID.',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@@ -135,9 +140,9 @@ return [
|
|||||||
| Custom Validation Attributes
|
| Custom Validation Attributes
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| The following language lines are used to swap attribute place-holders
|
| The following language lines are used to swap our attribute placeholder
|
||||||
| with something more reader friendly such as E-Mail Address instead
|
| with something more reader friendly such as "E-Mail Address" instead
|
||||||
| of "email". This simply helps us make messages a little cleaner.
|
| of "email". This simply helps us make our message more expressive.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
//
|
||||||
@@ -1,22 +1,21 @@
|
|||||||
<!doctype html>
|
<!DOCTYPE html>
|
||||||
<html lang="{{ app()->getLocale() }}">
|
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
<title>Laravel</title>
|
<title>Laravel</title>
|
||||||
|
|
||||||
<!-- Fonts -->
|
<!-- Fonts -->
|
||||||
<link href="https://fonts.googleapis.com/css?family=Raleway:100,600" rel="stylesheet" type="text/css">
|
<link href="https://fonts.googleapis.com/css?family=Nunito:200,600" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Styles -->
|
<!-- Styles -->
|
||||||
<style>
|
<style>
|
||||||
html, body {
|
html, body {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
color: #636b6f;
|
color: #636b6f;
|
||||||
font-family: 'Raleway', sans-serif;
|
font-family: 'Nunito', sans-serif;
|
||||||
font-weight: 100;
|
font-weight: 200;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
@@ -52,7 +51,7 @@
|
|||||||
.links > a {
|
.links > a {
|
||||||
color: #636b6f;
|
color: #636b6f;
|
||||||
padding: 0 25px;
|
padding: 0 25px;
|
||||||
font-size: 12px;
|
font-size: 13px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
letter-spacing: .1rem;
|
letter-spacing: .1rem;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@@ -72,7 +71,10 @@
|
|||||||
<a href="{{ url('/home') }}">Home</a>
|
<a href="{{ url('/home') }}">Home</a>
|
||||||
@else
|
@else
|
||||||
<a href="{{ route('login') }}">Login</a>
|
<a href="{{ route('login') }}">Login</a>
|
||||||
<a href="{{ route('register') }}">Register</a>
|
|
||||||
|
@if (Route::has('register'))
|
||||||
|
<a href="{{ route('register') }}">Register</a>
|
||||||
|
@endif
|
||||||
@endauth
|
@endauth
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@@ -83,10 +85,13 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="links">
|
<div class="links">
|
||||||
<a href="https://laravel.com/docs">Documentation</a>
|
<a href="https://laravel.com/docs">Docs</a>
|
||||||
<a href="https://laracasts.com">Laracasts</a>
|
<a href="https://laracasts.com">Laracasts</a>
|
||||||
<a href="https://laravel-news.com">News</a>
|
<a href="https://laravel-news.com">News</a>
|
||||||
|
<a href="https://blog.laravel.com">Blog</a>
|
||||||
|
<a href="https://nova.laravel.com">Nova</a>
|
||||||
<a href="https://forge.laravel.com">Forge</a>
|
<a href="https://forge.laravel.com">Forge</a>
|
||||||
|
<a href="https://vapor.laravel.com">Vapor</a>
|
||||||
<a href="https://github.com/laravel/laravel">GitHub</a>
|
<a href="https://github.com/laravel/laravel">GitHub</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
{{>licenseInfo}}
|
{{>licenseInfo}}
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
||||||
{{#apiInfo}}
|
{{#apiInfo}}
|
||||||
{{#apis}}
|
{{#apis}}
|
||||||
{{#operations}}
|
{{#operations}}
|
||||||
@@ -17,3 +21,6 @@ Route::{{httpMethod}}('{{{basePathWithoutHost}}}{{{path}}}', '{{classname}}@{{op
|
|||||||
{{/apis}}
|
{{/apis}}
|
||||||
{{/apiInfo}}
|
{{/apiInfo}}
|
||||||
|
|
||||||
|
Route::middleware('auth:api')->get('/user', function (Request $request) {
|
||||||
|
return $request->user();
|
||||||
|
});
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
{{>licenseInfo}}
|
{{>licenseInfo}}
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Broadcast;
|
||||||
|
|
||||||
Broadcast::channel('App.User.{id}', function ($user, $id) {
|
Broadcast::channel('App.User.{id}', function ($user, $id) {
|
||||||
return (int) $user->id === (int) $id;
|
return (int) $user->id === (int) $id;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
{{>licenseInfo}}
|
{{>licenseInfo}}
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Inspiring;
|
||||||
|
use Illuminate\Support\Facades\Artisan;
|
||||||
|
|
||||||
Artisan::command('inspire', function () {
|
Artisan::command('inspire', function () {
|
||||||
$this->comment(Inspiring::quote());
|
$this->comment(Inspiring::quote());
|
||||||
})->describe('Display an inspiring quote');
|
})->describe('Display an inspiring quote');
|
||||||
@@ -2,4 +2,8 @@
|
|||||||
|
|
||||||
{{>licenseInfo}}
|
{{>licenseInfo}}
|
||||||
|
|
||||||
Route::get('/', 'Controller@welcome');
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
||||||
|
Route::get('/', function () {
|
||||||
|
return view('welcome');
|
||||||
|
});
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
php:
|
||||||
|
preset: laravel
|
||||||
|
disabled:
|
||||||
|
- unused_use
|
||||||
|
finder:
|
||||||
|
not-name:
|
||||||
|
- index.php
|
||||||
|
- server.php
|
||||||
|
js:
|
||||||
|
finder:
|
||||||
|
not-name:
|
||||||
|
- webpack.mix.js
|
||||||
|
css: true
|
||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
namespace Tests\Feature;
|
namespace Tests\Feature;
|
||||||
|
|
||||||
use Tests\TestCase;
|
|
||||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||||
|
use Tests\TestCase;
|
||||||
|
|
||||||
class ExampleTest extends TestCase
|
class ExampleTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
namespace Tests\Unit;
|
namespace Tests\Unit;
|
||||||
|
|
||||||
use Tests\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
||||||
|
|
||||||
class ExampleTest extends TestCase
|
class ExampleTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
let mix = require('laravel-mix');
|
const mix = require('laravel-mix');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@@ -11,5 +11,5 @@ let mix = require('laravel-mix');
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
mix.js('resources/assets/js/app.js', 'public/js')
|
mix.js('resources/js/app.js', 'public/js')
|
||||||
.sass('resources/assets/sass/app.scss', 'public/css');
|
.sass('resources/sass/app.scss', 'public/css');
|
||||||
|
|||||||
1
pom.xml
1
pom.xml
@@ -1182,6 +1182,7 @@
|
|||||||
<module>samples/server/petstore/python-flask</module>
|
<module>samples/server/petstore/python-flask</module>
|
||||||
<module>samples/server/petstore/python-flask-python2</module>
|
<module>samples/server/petstore/python-flask-python2</module>
|
||||||
<module>samples/server/petstore/php-slim4</module>
|
<module>samples/server/petstore/php-slim4</module>
|
||||||
|
<module>samples/server/petstore/php-laravel</module>
|
||||||
<module>samples/server/petstore/rust-server</module>
|
<module>samples/server/petstore/rust-server</module>
|
||||||
<!-- clients -->
|
<!-- clients -->
|
||||||
<module>samples/client/petstore/perl</module>
|
<module>samples/client/petstore/perl</module>
|
||||||
|
|||||||
19
samples/server/petstore/php-laravel/.gitignore
vendored
19
samples/server/petstore/php-laravel/.gitignore
vendored
@@ -1,19 +0,0 @@
|
|||||||
# ref: https://github.com/github/gitignore/blob/master/Laravel.gitignore
|
|
||||||
|
|
||||||
vendor/
|
|
||||||
node_modules/
|
|
||||||
npm-debug.log
|
|
||||||
yarn-error.log
|
|
||||||
|
|
||||||
# Laravel 4 specific
|
|
||||||
bootstrap/compiled.php
|
|
||||||
app/storage/
|
|
||||||
|
|
||||||
# Laravel 5 & Lumen specific
|
|
||||||
public/storage
|
|
||||||
public/hot
|
|
||||||
storage/*.key
|
|
||||||
.env
|
|
||||||
Homestead.yaml
|
|
||||||
Homestead.json
|
|
||||||
/.vagrant
|
|
||||||
@@ -1,36 +1,33 @@
|
|||||||
.gitignore
|
lib/.editorconfig
|
||||||
lib/.env.example
|
lib/.env.example
|
||||||
|
lib/.gitattributes
|
||||||
|
lib/.gitignore
|
||||||
|
lib/.styleci.yml
|
||||||
lib/README.md
|
lib/README.md
|
||||||
lib/app/Console/Kernel.php
|
lib/app/Console/Kernel.php
|
||||||
lib/app/Exceptions/Handler.php
|
lib/app/Exceptions/Handler.php
|
||||||
lib/app/Http/Controllers/AnotherFakeController.php
|
lib/app/Http/Controllers/AnotherFakeController.php
|
||||||
lib/app/Http/Controllers/Controller.php
|
lib/app/Http/Controllers/Controller.php
|
||||||
|
lib/app/Http/Controllers/DefaultController.php
|
||||||
lib/app/Http/Controllers/FakeClassnameTags123Controller.php
|
lib/app/Http/Controllers/FakeClassnameTags123Controller.php
|
||||||
lib/app/Http/Controllers/FakeController.php
|
lib/app/Http/Controllers/FakeController.php
|
||||||
lib/app/Http/Controllers/PetController.php
|
lib/app/Http/Controllers/PetController.php
|
||||||
lib/app/Http/Controllers/StoreController.php
|
lib/app/Http/Controllers/StoreController.php
|
||||||
lib/app/Http/Controllers/UserController.php
|
lib/app/Http/Controllers/UserController.php
|
||||||
lib/app/Http/Kernel.php
|
lib/app/Http/Kernel.php
|
||||||
|
lib/app/Http/Middleware/Authenticate.php
|
||||||
|
lib/app/Http/Middleware/CheckForMaintenanceMode.php
|
||||||
lib/app/Http/Middleware/EncryptCookies.php
|
lib/app/Http/Middleware/EncryptCookies.php
|
||||||
lib/app/Http/Middleware/RedirectIfAuthenticated.php
|
lib/app/Http/Middleware/RedirectIfAuthenticated.php
|
||||||
lib/app/Http/Middleware/TrimStrings.php
|
lib/app/Http/Middleware/TrimStrings.php
|
||||||
lib/app/Http/Middleware/TrustProxies.php
|
lib/app/Http/Middleware/TrustProxies.php
|
||||||
lib/app/Http/Middleware/VerifyCsrfToken.php
|
lib/app/Http/Middleware/VerifyCsrfToken.php
|
||||||
lib/app/Models/AdditionalPropertiesAnyType.php
|
|
||||||
lib/app/Models/AdditionalPropertiesArray.php
|
|
||||||
lib/app/Models/AdditionalPropertiesBoolean.php
|
|
||||||
lib/app/Models/AdditionalPropertiesClass.php
|
lib/app/Models/AdditionalPropertiesClass.php
|
||||||
lib/app/Models/AdditionalPropertiesInteger.php
|
|
||||||
lib/app/Models/AdditionalPropertiesNumber.php
|
|
||||||
lib/app/Models/AdditionalPropertiesObject.php
|
|
||||||
lib/app/Models/AdditionalPropertiesString.php
|
|
||||||
lib/app/Models/Animal.php
|
lib/app/Models/Animal.php
|
||||||
lib/app/Models/ApiResponse.php
|
lib/app/Models/ApiResponse.php
|
||||||
lib/app/Models/ArrayOfArrayOfNumberOnly.php
|
lib/app/Models/ArrayOfArrayOfNumberOnly.php
|
||||||
lib/app/Models/ArrayOfNumberOnly.php
|
lib/app/Models/ArrayOfNumberOnly.php
|
||||||
lib/app/Models/ArrayTest.php
|
lib/app/Models/ArrayTest.php
|
||||||
lib/app/Models/BigCat.php
|
|
||||||
lib/app/Models/BigCatAllOf.php
|
|
||||||
lib/app/Models/Capitalization.php
|
lib/app/Models/Capitalization.php
|
||||||
lib/app/Models/Cat.php
|
lib/app/Models/Cat.php
|
||||||
lib/app/Models/CatAllOf.php
|
lib/app/Models/CatAllOf.php
|
||||||
@@ -43,39 +40,50 @@ lib/app/Models/EnumArrays.php
|
|||||||
lib/app/Models/EnumClass.php
|
lib/app/Models/EnumClass.php
|
||||||
lib/app/Models/EnumTest.php
|
lib/app/Models/EnumTest.php
|
||||||
lib/app/Models/FileSchemaTestClass.php
|
lib/app/Models/FileSchemaTestClass.php
|
||||||
|
lib/app/Models/Foo.php
|
||||||
lib/app/Models/FormatTest.php
|
lib/app/Models/FormatTest.php
|
||||||
lib/app/Models/HasOnlyReadOnly.php
|
lib/app/Models/HasOnlyReadOnly.php
|
||||||
|
lib/app/Models/HealthCheckResult.php
|
||||||
|
lib/app/Models/InlineObject.php
|
||||||
|
lib/app/Models/InlineObject1.php
|
||||||
|
lib/app/Models/InlineObject2.php
|
||||||
|
lib/app/Models/InlineObject3.php
|
||||||
|
lib/app/Models/InlineObject4.php
|
||||||
|
lib/app/Models/InlineObject5.php
|
||||||
|
lib/app/Models/InlineResponseDefault.php
|
||||||
lib/app/Models/MapTest.php
|
lib/app/Models/MapTest.php
|
||||||
lib/app/Models/MixedPropertiesAndAdditionalPropertiesClass.php
|
lib/app/Models/MixedPropertiesAndAdditionalPropertiesClass.php
|
||||||
lib/app/Models/Model200Response.php
|
lib/app/Models/Model200Response.php
|
||||||
lib/app/Models/ModelReturn.php
|
lib/app/Models/ModelReturn.php
|
||||||
lib/app/Models/Name.php
|
lib/app/Models/Name.php
|
||||||
|
lib/app/Models/NullableClass.php
|
||||||
lib/app/Models/NumberOnly.php
|
lib/app/Models/NumberOnly.php
|
||||||
lib/app/Models/Order.php
|
lib/app/Models/Order.php
|
||||||
lib/app/Models/OuterComposite.php
|
lib/app/Models/OuterComposite.php
|
||||||
lib/app/Models/OuterEnum.php
|
lib/app/Models/OuterEnum.php
|
||||||
|
lib/app/Models/OuterEnumDefaultValue.php
|
||||||
|
lib/app/Models/OuterEnumInteger.php
|
||||||
|
lib/app/Models/OuterEnumIntegerDefaultValue.php
|
||||||
lib/app/Models/Pet.php
|
lib/app/Models/Pet.php
|
||||||
lib/app/Models/ReadOnlyFirst.php
|
lib/app/Models/ReadOnlyFirst.php
|
||||||
lib/app/Models/SpecialModelName.php
|
lib/app/Models/SpecialModelName.php
|
||||||
lib/app/Models/Tag.php
|
lib/app/Models/Tag.php
|
||||||
lib/app/Models/TypeHolderDefault.php
|
|
||||||
lib/app/Models/TypeHolderExample.php
|
|
||||||
lib/app/Models/User.php
|
lib/app/Models/User.php
|
||||||
lib/app/Models/XmlItem.php
|
|
||||||
lib/app/Providers/AppServiceProvider.php
|
lib/app/Providers/AppServiceProvider.php
|
||||||
lib/app/Providers/AuthServiceProvider.php
|
lib/app/Providers/AuthServiceProvider.php
|
||||||
lib/app/Providers/BroadcastServiceProvider.php
|
lib/app/Providers/BroadcastServiceProvider.php
|
||||||
lib/app/Providers/EventServiceProvider.php
|
lib/app/Providers/EventServiceProvider.php
|
||||||
lib/app/Providers/RouteServiceProvider.php
|
lib/app/Providers/RouteServiceProvider.php
|
||||||
|
lib/app/RouteServiceProvider.php
|
||||||
lib/artisan
|
lib/artisan
|
||||||
lib/bootstrap/app.php
|
lib/bootstrap/app.php
|
||||||
lib/bootstrap/cache/.gitignore
|
lib/bootstrap/cache/.gitignore
|
||||||
lib/bootstrap/testingAutoload.php
|
|
||||||
lib/composer.json
|
lib/composer.json
|
||||||
lib/config/app.php
|
lib/config/app.php
|
||||||
lib/config/auth.php
|
lib/config/auth.php
|
||||||
lib/config/broadcasting.php
|
lib/config/broadcasting.php
|
||||||
lib/config/cache.php
|
lib/config/cache.php
|
||||||
|
lib/config/cors.php
|
||||||
lib/config/database.php
|
lib/config/database.php
|
||||||
lib/config/filesystems.php
|
lib/config/filesystems.php
|
||||||
lib/config/hashing.php
|
lib/config/hashing.php
|
||||||
@@ -88,21 +96,18 @@ lib/config/view.php
|
|||||||
lib/database/.gitignore
|
lib/database/.gitignore
|
||||||
lib/database/factories/UserFactory.php
|
lib/database/factories/UserFactory.php
|
||||||
lib/database/migrations/2014_10_12_000000_create_users_table.php
|
lib/database/migrations/2014_10_12_000000_create_users_table.php
|
||||||
lib/database/migrations/2014_10_12_100000_create_password_resets_table.php
|
lib/database/migrations/2019_08_19_000000_create_failed_jobs_table.php
|
||||||
|
lib/database/migrations/2019_08_19_000000_create_failed_jobs_table.php
|
||||||
lib/database/seeds/DatabaseSeeder.php
|
lib/database/seeds/DatabaseSeeder.php
|
||||||
lib/package.json
|
lib/package.json
|
||||||
lib/phpunit.xml
|
lib/phpunit.xml
|
||||||
lib/public/.htaccess
|
lib/public/.htaccess
|
||||||
lib/public/css/app.css
|
|
||||||
lib/public/favicon.ico
|
lib/public/favicon.ico
|
||||||
lib/public/index.php
|
lib/public/index.php
|
||||||
lib/public/js/app.js
|
|
||||||
lib/public/robots.txt
|
lib/public/robots.txt
|
||||||
lib/public/web.config
|
lib/public/web.config
|
||||||
lib/resources/assets/js/app.js
|
lib/resources/assets/js/app.js
|
||||||
lib/resources/assets/js/bootstrap.js
|
lib/resources/assets/js/bootstrap.js
|
||||||
lib/resources/assets/js/components/ExampleComponent.vue
|
|
||||||
lib/resources/assets/sass/_variables.scss
|
|
||||||
lib/resources/assets/sass/app.scss
|
lib/resources/assets/sass/app.scss
|
||||||
lib/resources/lang/en/auth.php
|
lib/resources/lang/en/auth.php
|
||||||
lib/resources/lang/en/pagination.php
|
lib/resources/lang/en/pagination.php
|
||||||
@@ -118,6 +123,7 @@ lib/storage/app/.gitignore
|
|||||||
lib/storage/app/public/.gitignore
|
lib/storage/app/public/.gitignore
|
||||||
lib/storage/framework/.gitignore
|
lib/storage/framework/.gitignore
|
||||||
lib/storage/framework/cache/.gitignore
|
lib/storage/framework/cache/.gitignore
|
||||||
|
lib/storage/framework/cache/.gitignore
|
||||||
lib/storage/framework/sessions/.gitignore
|
lib/storage/framework/sessions/.gitignore
|
||||||
lib/storage/framework/testing/.gitignore
|
lib/storage/framework/testing/.gitignore
|
||||||
lib/storage/framework/views/.gitignore
|
lib/storage/framework/views/.gitignore
|
||||||
|
|||||||
15
samples/server/petstore/php-laravel/lib/.editorconfig
Normal file
15
samples/server/petstore/php-laravel/lib/.editorconfig
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
|
||||||
|
[*.{yml,yaml}]
|
||||||
|
indent_size = 2
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
APP_NAME=Laravel
|
|
||||||
APP_ENV=local
|
|
||||||
APP_KEY=base64:DLKuAaa5bAytB73eQNHV4KBfRzQxh9ix8J3gc0sbfGc=
|
|
||||||
APP_DEBUG=true
|
|
||||||
APP_URL=http://localhost
|
|
||||||
|
|
||||||
LOG_CHANNEL=stack
|
|
||||||
|
|
||||||
DB_CONNECTION=mysql
|
|
||||||
DB_HOST=127.0.0.1
|
|
||||||
DB_PORT=3306
|
|
||||||
DB_DATABASE=homestead
|
|
||||||
DB_USERNAME=homestead
|
|
||||||
DB_PASSWORD=secret
|
|
||||||
|
|
||||||
BROADCAST_DRIVER=log
|
|
||||||
CACHE_DRIVER=file
|
|
||||||
SESSION_DRIVER=file
|
|
||||||
SESSION_LIFETIME=120
|
|
||||||
QUEUE_DRIVER=sync
|
|
||||||
|
|
||||||
REDIS_HOST=127.0.0.1
|
|
||||||
REDIS_PASSWORD=null
|
|
||||||
REDIS_PORT=6379
|
|
||||||
|
|
||||||
MAIL_DRIVER=smtp
|
|
||||||
MAIL_HOST=smtp.mailtrap.io
|
|
||||||
MAIL_PORT=2525
|
|
||||||
MAIL_USERNAME=null
|
|
||||||
MAIL_PASSWORD=null
|
|
||||||
MAIL_ENCRYPTION=null
|
|
||||||
|
|
||||||
PUSHER_APP_ID=
|
|
||||||
PUSHER_APP_KEY=
|
|
||||||
PUSHER_APP_SECRET=
|
|
||||||
PUSHER_APP_CLUSTER=mt1
|
|
||||||
|
|
||||||
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
|
||||||
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
|
||||||
@@ -9,26 +9,33 @@ LOG_CHANNEL=stack
|
|||||||
DB_CONNECTION=mysql
|
DB_CONNECTION=mysql
|
||||||
DB_HOST=127.0.0.1
|
DB_HOST=127.0.0.1
|
||||||
DB_PORT=3306
|
DB_PORT=3306
|
||||||
DB_DATABASE=homestead
|
DB_DATABASE=laravel
|
||||||
DB_USERNAME=homestead
|
DB_USERNAME=root
|
||||||
DB_PASSWORD=secret
|
DB_PASSWORD=
|
||||||
|
|
||||||
BROADCAST_DRIVER=log
|
BROADCAST_DRIVER=log
|
||||||
CACHE_DRIVER=file
|
CACHE_DRIVER=file
|
||||||
|
QUEUE_CONNECTION=sync
|
||||||
SESSION_DRIVER=file
|
SESSION_DRIVER=file
|
||||||
SESSION_LIFETIME=120
|
SESSION_LIFETIME=120
|
||||||
QUEUE_DRIVER=sync
|
|
||||||
|
|
||||||
REDIS_HOST=127.0.0.1
|
REDIS_HOST=127.0.0.1
|
||||||
REDIS_PASSWORD=null
|
REDIS_PASSWORD=null
|
||||||
REDIS_PORT=6379
|
REDIS_PORT=6379
|
||||||
|
|
||||||
MAIL_DRIVER=smtp
|
MAIL_MAILER=smtp
|
||||||
MAIL_HOST=smtp.mailtrap.io
|
MAIL_HOST=smtp.mailtrap.io
|
||||||
MAIL_PORT=2525
|
MAIL_PORT=2525
|
||||||
MAIL_USERNAME=null
|
MAIL_USERNAME=null
|
||||||
MAIL_PASSWORD=null
|
MAIL_PASSWORD=null
|
||||||
MAIL_ENCRYPTION=null
|
MAIL_ENCRYPTION=null
|
||||||
|
MAIL_FROM_ADDRESS=null
|
||||||
|
MAIL_FROM_NAME="${APP_NAME}"
|
||||||
|
|
||||||
|
AWS_ACCESS_KEY_ID=
|
||||||
|
AWS_SECRET_ACCESS_KEY=
|
||||||
|
AWS_DEFAULT_REGION=us-east-1
|
||||||
|
AWS_BUCKET=
|
||||||
|
|
||||||
PUSHER_APP_ID=
|
PUSHER_APP_ID=
|
||||||
PUSHER_APP_KEY=
|
PUSHER_APP_KEY=
|
||||||
|
|||||||
5
samples/server/petstore/php-laravel/lib/.gitattributes
vendored
Normal file
5
samples/server/petstore/php-laravel/lib/.gitattributes
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
* text=auto
|
||||||
|
*.css linguist-vendored
|
||||||
|
*.scss linguist-vendored
|
||||||
|
*.js linguist-vendored
|
||||||
|
CHANGELOG.md export-ignore
|
||||||
16
samples/server/petstore/php-laravel/lib/.gitignore
vendored
Normal file
16
samples/server/petstore/php-laravel/lib/.gitignore
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
/node_modules
|
||||||
|
/public/hot
|
||||||
|
/public/storage
|
||||||
|
/storage/*.key
|
||||||
|
/vendor
|
||||||
|
.env
|
||||||
|
.env.backup
|
||||||
|
.phpunit.result.cache
|
||||||
|
Homestead.json
|
||||||
|
Homestead.yaml
|
||||||
|
npm-debug.log
|
||||||
|
yarn-error.log
|
||||||
|
|
||||||
|
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
|
||||||
|
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
|
||||||
|
composer.lock
|
||||||
13
samples/server/petstore/php-laravel/lib/.styleci.yml
Normal file
13
samples/server/petstore/php-laravel/lib/.styleci.yml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
php:
|
||||||
|
preset: laravel
|
||||||
|
disabled:
|
||||||
|
- unused_use
|
||||||
|
finder:
|
||||||
|
not-name:
|
||||||
|
- index.php
|
||||||
|
- server.php
|
||||||
|
js:
|
||||||
|
finder:
|
||||||
|
not-name:
|
||||||
|
- webpack.mix.js
|
||||||
|
css: true
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
# OpenAPI generated server
|
# OpenAPI generated server
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
* PHP 7.1.3 or newer
|
* PHP 7.2.5 or newer
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
This server was generated by the [openapi-generator](https://github.com/openapitools/openapi-generator) project. By using the
|
This server was generated by the [openapi-generator](https://github.com/openapitools/openapi-generator) project. By using the
|
||||||
|
|||||||
@@ -24,8 +24,7 @@ class Kernel extends ConsoleKernel
|
|||||||
*/
|
*/
|
||||||
protected function schedule(Schedule $schedule)
|
protected function schedule(Schedule $schedule)
|
||||||
{
|
{
|
||||||
// $schedule->command('inspire')
|
// $schedule->command('inspire')->hourly();
|
||||||
// ->hourly();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
namespace App\Exceptions;
|
namespace App\Exceptions;
|
||||||
|
|
||||||
use Exception;
|
|
||||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||||
|
use Throwable;
|
||||||
|
|
||||||
class Handler extends ExceptionHandler
|
class Handler extends ExceptionHandler
|
||||||
{
|
{
|
||||||
@@ -29,10 +29,12 @@ class Handler extends ExceptionHandler
|
|||||||
/**
|
/**
|
||||||
* Report or log an exception.
|
* Report or log an exception.
|
||||||
*
|
*
|
||||||
* @param \Exception $exception
|
* @param \Throwable $exception
|
||||||
* @return void
|
* @return void
|
||||||
|
*
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function report(Exception $exception)
|
public function report(Throwable $exception)
|
||||||
{
|
{
|
||||||
parent::report($exception);
|
parent::report($exception);
|
||||||
}
|
}
|
||||||
@@ -41,10 +43,12 @@ class Handler extends ExceptionHandler
|
|||||||
* Render an exception into an HTTP response.
|
* Render an exception into an HTTP response.
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Http\Request $request
|
* @param \Illuminate\Http\Request $request
|
||||||
* @param \Exception $exception
|
* @param \Throwable $exception
|
||||||
* @return \Illuminate\Http\Response
|
* @return \Symfony\Component\HttpFoundation\Response
|
||||||
|
*
|
||||||
|
* @throws \Throwable
|
||||||
*/
|
*/
|
||||||
public function render($request, Exception $exception)
|
public function render($request, Throwable $exception)
|
||||||
{
|
{
|
||||||
return parent::render($request, $exception);
|
return parent::render($request, $exception);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
/**
|
/**
|
||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
* PHP version 7.1.3
|
* PHP version 7.2.5
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
@@ -47,10 +47,10 @@ class AnotherFakeController extends Controller
|
|||||||
|
|
||||||
|
|
||||||
//not path params validation
|
//not path params validation
|
||||||
if (!isset($input['body'])) {
|
if (!isset($input['client'])) {
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $body when calling call123TestSpecialTags');
|
throw new \InvalidArgumentException('Missing the required parameter $client when calling call123TestSpecialTags');
|
||||||
}
|
}
|
||||||
$body = $input['body'];
|
$client = $input['client'];
|
||||||
|
|
||||||
|
|
||||||
return response('How about implementing call123TestSpecialTags as a patch method ?');
|
return response('How about implementing call123TestSpecialTags as a patch method ?');
|
||||||
|
|||||||
@@ -7,20 +7,7 @@ use Illuminate\Foundation\Bus\DispatchesJobs;
|
|||||||
use Illuminate\Foundation\Validation\ValidatesRequests;
|
use Illuminate\Foundation\Validation\ValidatesRequests;
|
||||||
use Illuminate\Routing\Controller as BaseController;
|
use Illuminate\Routing\Controller as BaseController;
|
||||||
|
|
||||||
/**
|
|
||||||
* Class Controller
|
|
||||||
*
|
|
||||||
* @package App\Http\Controllers
|
|
||||||
*/
|
|
||||||
class Controller extends BaseController
|
class Controller extends BaseController
|
||||||
{
|
{
|
||||||
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
|
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
|
||||||
|
|
||||||
/**
|
|
||||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
|
||||||
*/
|
|
||||||
public function welcome()
|
|
||||||
{
|
|
||||||
return view('welcome');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OpenAPI Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
* PHP version 7.2.5
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI-Generator
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*
|
||||||
|
* Source files are located at:
|
||||||
|
*
|
||||||
|
* > https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/php-laravel/
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Request;
|
||||||
|
|
||||||
|
class DefaultController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Operation fooGet
|
||||||
|
*
|
||||||
|
* .
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @return Http response
|
||||||
|
*/
|
||||||
|
public function fooGet()
|
||||||
|
{
|
||||||
|
$input = Request::all();
|
||||||
|
|
||||||
|
//path params validation
|
||||||
|
|
||||||
|
|
||||||
|
//not path params validation
|
||||||
|
|
||||||
|
return response('How about implementing fooGet as a get method ?');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
/**
|
/**
|
||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
* PHP version 7.1.3
|
* PHP version 7.2.5
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
@@ -47,10 +47,10 @@ class FakeClassnameTags123Controller extends Controller
|
|||||||
|
|
||||||
|
|
||||||
//not path params validation
|
//not path params validation
|
||||||
if (!isset($input['body'])) {
|
if (!isset($input['client'])) {
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $body when calling testClassname');
|
throw new \InvalidArgumentException('Missing the required parameter $client when calling testClassname');
|
||||||
}
|
}
|
||||||
$body = $input['body'];
|
$client = $input['client'];
|
||||||
|
|
||||||
|
|
||||||
return response('How about implementing testClassname as a patch method ?');
|
return response('How about implementing testClassname as a patch method ?');
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
/**
|
/**
|
||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
* PHP version 7.1.3
|
* PHP version 7.2.5
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
@@ -47,10 +47,10 @@ class FakeController extends Controller
|
|||||||
|
|
||||||
|
|
||||||
//not path params validation
|
//not path params validation
|
||||||
if (!isset($input['body'])) {
|
if (!isset($input['client'])) {
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $body when calling testClientModel');
|
throw new \InvalidArgumentException('Missing the required parameter $client when calling testClientModel');
|
||||||
}
|
}
|
||||||
$body = $input['body'];
|
$client = $input['client'];
|
||||||
|
|
||||||
|
|
||||||
return response('How about implementing testClientModel as a patch method ?');
|
return response('How about implementing testClientModel as a patch method ?');
|
||||||
@@ -58,7 +58,7 @@ class FakeController extends Controller
|
|||||||
/**
|
/**
|
||||||
* Operation testEndpointParameters
|
* Operation testEndpointParameters
|
||||||
*
|
*
|
||||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트.
|
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @return Http response
|
* @return Http response
|
||||||
@@ -244,10 +244,10 @@ class FakeController extends Controller
|
|||||||
|
|
||||||
|
|
||||||
//not path params validation
|
//not path params validation
|
||||||
if (!isset($input['body'])) {
|
if (!isset($input['fileSchemaTestClass'])) {
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $body when calling testBodyWithFileSchema');
|
throw new \InvalidArgumentException('Missing the required parameter $fileSchemaTestClass when calling testBodyWithFileSchema');
|
||||||
}
|
}
|
||||||
$body = $input['body'];
|
$fileSchemaTestClass = $input['fileSchemaTestClass'];
|
||||||
|
|
||||||
|
|
||||||
return response('How about implementing testBodyWithFileSchema as a put method ?');
|
return response('How about implementing testBodyWithFileSchema as a put method ?');
|
||||||
@@ -273,23 +273,23 @@ class FakeController extends Controller
|
|||||||
}
|
}
|
||||||
$query = $input['query'];
|
$query = $input['query'];
|
||||||
|
|
||||||
if (!isset($input['body'])) {
|
if (!isset($input['user'])) {
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $body when calling testBodyWithQueryParams');
|
throw new \InvalidArgumentException('Missing the required parameter $user when calling testBodyWithQueryParams');
|
||||||
}
|
}
|
||||||
$body = $input['body'];
|
$user = $input['user'];
|
||||||
|
|
||||||
|
|
||||||
return response('How about implementing testBodyWithQueryParams as a put method ?');
|
return response('How about implementing testBodyWithQueryParams as a put method ?');
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Operation createXmlItem
|
* Operation fakeHealthGet
|
||||||
*
|
*
|
||||||
* creates an XmlItem.
|
* Health check endpoint.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @return Http response
|
* @return Http response
|
||||||
*/
|
*/
|
||||||
public function createXmlItem()
|
public function fakeHealthGet()
|
||||||
{
|
{
|
||||||
$input = Request::all();
|
$input = Request::all();
|
||||||
|
|
||||||
@@ -297,13 +297,36 @@ class FakeController extends Controller
|
|||||||
|
|
||||||
|
|
||||||
//not path params validation
|
//not path params validation
|
||||||
if (!isset($input['xmlItem'])) {
|
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $xmlItem when calling createXmlItem');
|
return response('How about implementing fakeHealthGet as a get method ?');
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Operation fakeHttpSignatureTest
|
||||||
|
*
|
||||||
|
* test http signature authentication.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @return Http response
|
||||||
|
*/
|
||||||
|
public function fakeHttpSignatureTest()
|
||||||
|
{
|
||||||
|
$input = Request::all();
|
||||||
|
|
||||||
|
//path params validation
|
||||||
|
|
||||||
|
|
||||||
|
//not path params validation
|
||||||
|
if (!isset($input['pet'])) {
|
||||||
|
throw new \InvalidArgumentException('Missing the required parameter $pet when calling fakeHttpSignatureTest');
|
||||||
}
|
}
|
||||||
$xmlItem = $input['xmlItem'];
|
$pet = $input['pet'];
|
||||||
|
|
||||||
|
$query1 = $input['query1'];
|
||||||
|
|
||||||
|
$header1 = $input['header1'];
|
||||||
|
|
||||||
|
|
||||||
return response('How about implementing createXmlItem as a post method ?');
|
return response('How about implementing fakeHttpSignatureTest as a get method ?');
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Operation testInlineAdditionalProperties
|
* Operation testInlineAdditionalProperties
|
||||||
@@ -321,10 +344,10 @@ class FakeController extends Controller
|
|||||||
|
|
||||||
|
|
||||||
//not path params validation
|
//not path params validation
|
||||||
if (!isset($input['param'])) {
|
if (!isset($input['requestBody'])) {
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $param when calling testInlineAdditionalProperties');
|
throw new \InvalidArgumentException('Missing the required parameter $requestBody when calling testInlineAdditionalProperties');
|
||||||
}
|
}
|
||||||
$param = $input['param'];
|
$requestBody = $input['requestBody'];
|
||||||
|
|
||||||
|
|
||||||
return response('How about implementing testInlineAdditionalProperties as a post method ?');
|
return response('How about implementing testInlineAdditionalProperties as a post method ?');
|
||||||
@@ -395,7 +418,7 @@ class FakeController extends Controller
|
|||||||
|
|
||||||
|
|
||||||
//not path params validation
|
//not path params validation
|
||||||
$body = $input['body'];
|
$outerComposite = $input['outerComposite'];
|
||||||
|
|
||||||
|
|
||||||
return response('How about implementing fakeOuterCompositeSerialize as a post method ?');
|
return response('How about implementing fakeOuterCompositeSerialize as a post method ?');
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
/**
|
/**
|
||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
* PHP version 7.1.3
|
* PHP version 7.2.5
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
@@ -67,10 +67,10 @@ class PetController extends Controller
|
|||||||
|
|
||||||
|
|
||||||
//not path params validation
|
//not path params validation
|
||||||
if (!isset($input['body'])) {
|
if (!isset($input['pet'])) {
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $body when calling addPet');
|
throw new \InvalidArgumentException('Missing the required parameter $pet when calling addPet');
|
||||||
}
|
}
|
||||||
$body = $input['body'];
|
$pet = $input['pet'];
|
||||||
|
|
||||||
|
|
||||||
return response('How about implementing addPet as a post method ?');
|
return response('How about implementing addPet as a post method ?');
|
||||||
@@ -91,10 +91,10 @@ class PetController extends Controller
|
|||||||
|
|
||||||
|
|
||||||
//not path params validation
|
//not path params validation
|
||||||
if (!isset($input['body'])) {
|
if (!isset($input['pet'])) {
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $body when calling updatePet');
|
throw new \InvalidArgumentException('Missing the required parameter $pet when calling updatePet');
|
||||||
}
|
}
|
||||||
$body = $input['body'];
|
$pet = $input['pet'];
|
||||||
|
|
||||||
|
|
||||||
return response('How about implementing updatePet as a put method ?');
|
return response('How about implementing updatePet as a put method ?');
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
/**
|
/**
|
||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
* PHP version 7.1.3
|
* PHP version 7.2.5
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
@@ -66,10 +66,10 @@ class StoreController extends Controller
|
|||||||
|
|
||||||
|
|
||||||
//not path params validation
|
//not path params validation
|
||||||
if (!isset($input['body'])) {
|
if (!isset($input['order'])) {
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $body when calling placeOrder');
|
throw new \InvalidArgumentException('Missing the required parameter $order when calling placeOrder');
|
||||||
}
|
}
|
||||||
$body = $input['body'];
|
$order = $input['order'];
|
||||||
|
|
||||||
|
|
||||||
return response('How about implementing placeOrder as a post method ?');
|
return response('How about implementing placeOrder as a post method ?');
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
/**
|
/**
|
||||||
* OpenAPI Petstore
|
* OpenAPI Petstore
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
* PHP version 7.1.3
|
* PHP version 7.2.5
|
||||||
*
|
*
|
||||||
* The version of the OpenAPI document: 1.0.0
|
* The version of the OpenAPI document: 1.0.0
|
||||||
*
|
*
|
||||||
@@ -47,10 +47,10 @@ class UserController extends Controller
|
|||||||
|
|
||||||
|
|
||||||
//not path params validation
|
//not path params validation
|
||||||
if (!isset($input['body'])) {
|
if (!isset($input['user'])) {
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $body when calling createUser');
|
throw new \InvalidArgumentException('Missing the required parameter $user when calling createUser');
|
||||||
}
|
}
|
||||||
$body = $input['body'];
|
$user = $input['user'];
|
||||||
|
|
||||||
|
|
||||||
return response('How about implementing createUser as a post method ?');
|
return response('How about implementing createUser as a post method ?');
|
||||||
@@ -71,10 +71,10 @@ class UserController extends Controller
|
|||||||
|
|
||||||
|
|
||||||
//not path params validation
|
//not path params validation
|
||||||
if (!isset($input['body'])) {
|
if (!isset($input['user'])) {
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $body when calling createUsersWithArrayInput');
|
throw new \InvalidArgumentException('Missing the required parameter $user when calling createUsersWithArrayInput');
|
||||||
}
|
}
|
||||||
$body = $input['body'];
|
$user = $input['user'];
|
||||||
|
|
||||||
|
|
||||||
return response('How about implementing createUsersWithArrayInput as a post method ?');
|
return response('How about implementing createUsersWithArrayInput as a post method ?');
|
||||||
@@ -95,10 +95,10 @@ class UserController extends Controller
|
|||||||
|
|
||||||
|
|
||||||
//not path params validation
|
//not path params validation
|
||||||
if (!isset($input['body'])) {
|
if (!isset($input['user'])) {
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $body when calling createUsersWithListInput');
|
throw new \InvalidArgumentException('Missing the required parameter $user when calling createUsersWithListInput');
|
||||||
}
|
}
|
||||||
$body = $input['body'];
|
$user = $input['user'];
|
||||||
|
|
||||||
|
|
||||||
return response('How about implementing createUsersWithListInput as a post method ?');
|
return response('How about implementing createUsersWithListInput as a post method ?');
|
||||||
|
|||||||
@@ -14,11 +14,12 @@ class Kernel extends HttpKernel
|
|||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $middleware = [
|
protected $middleware = [
|
||||||
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
|
\App\Http\Middleware\TrustProxies::class,
|
||||||
|
\Fruitcake\Cors\HandleCors::class,
|
||||||
|
\App\Http\Middleware\CheckForMaintenanceMode::class,
|
||||||
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
|
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
|
||||||
\App\Http\Middleware\TrimStrings::class,
|
\App\Http\Middleware\TrimStrings::class,
|
||||||
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
|
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
|
||||||
\App\Http\Middleware\TrustProxies::class,
|
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -39,7 +40,7 @@ class Kernel extends HttpKernel
|
|||||||
|
|
||||||
'api' => [
|
'api' => [
|
||||||
'throttle:60,1',
|
'throttle:60,1',
|
||||||
'bindings',
|
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -51,13 +52,15 @@ class Kernel extends HttpKernel
|
|||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $routeMiddleware = [
|
protected $routeMiddleware = [
|
||||||
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
|
'auth' => \App\Http\Middleware\Authenticate::class,
|
||||||
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
||||||
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
|
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||||
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
|
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
|
||||||
'can' => \Illuminate\Auth\Middleware\Authorize::class,
|
'can' => \Illuminate\Auth\Middleware\Authorize::class,
|
||||||
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
||||||
|
'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
|
||||||
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
|
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
|
||||||
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
||||||
|
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Illuminate\Auth\Middleware\Authenticate as Middleware;
|
||||||
|
|
||||||
|
class Authenticate extends Middleware
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Get the path the user should be redirected to when they are not authenticated.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @return string|null
|
||||||
|
*/
|
||||||
|
protected function redirectTo($request)
|
||||||
|
{
|
||||||
|
if (! $request->expectsJson()) {
|
||||||
|
return route('login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode as Middleware;
|
||||||
|
|
||||||
|
class CheckForMaintenanceMode extends Middleware
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The URIs that should be reachable while maintenance mode is enabled.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $except = [
|
||||||
|
//
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Http\Middleware;
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use App\Providers\RouteServiceProvider;
|
||||||
use Closure;
|
use Closure;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
|
||||||
@@ -18,7 +19,7 @@ class RedirectIfAuthenticated
|
|||||||
public function handle($request, Closure $next, $guard = null)
|
public function handle($request, Closure $next, $guard = null)
|
||||||
{
|
{
|
||||||
if (Auth::guard($guard)->check()) {
|
if (Auth::guard($guard)->check()) {
|
||||||
return redirect('/home');
|
return redirect(RouteServiceProvider::HOME);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $next($request);
|
return $next($request);
|
||||||
|
|||||||
@@ -2,15 +2,15 @@
|
|||||||
|
|
||||||
namespace App\Http\Middleware;
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Fideloper\Proxy\TrustProxies as Middleware;
|
use Fideloper\Proxy\TrustProxies as Middleware;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
class TrustProxies extends Middleware
|
class TrustProxies extends Middleware
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* The trusted proxies for this application.
|
* The trusted proxies for this application.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array|string|null
|
||||||
*/
|
*/
|
||||||
protected $proxies;
|
protected $proxies;
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* AdditionalPropertiesAnyType
|
|
||||||
*/
|
|
||||||
namespace app\Models;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* AdditionalPropertiesAnyType
|
|
||||||
*/
|
|
||||||
class AdditionalPropertiesAnyType {
|
|
||||||
|
|
||||||
/** @var string $name */
|
|
||||||
private $name;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* AdditionalPropertiesArray
|
|
||||||
*/
|
|
||||||
namespace app\Models;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* AdditionalPropertiesArray
|
|
||||||
*/
|
|
||||||
class AdditionalPropertiesArray {
|
|
||||||
|
|
||||||
/** @var string $name */
|
|
||||||
private $name;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* AdditionalPropertiesBoolean
|
|
||||||
*/
|
|
||||||
namespace app\Models;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* AdditionalPropertiesBoolean
|
|
||||||
*/
|
|
||||||
class AdditionalPropertiesBoolean {
|
|
||||||
|
|
||||||
/** @var string $name */
|
|
||||||
private $name;
|
|
||||||
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user