diff --git a/Modules/CetakLabel/Config/.gitkeep b/Modules/CetakLabel/Config/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/CetakLabel/Config/config.php b/Modules/CetakLabel/Config/config.php new file mode 100644 index 0000000..bd28f88 --- /dev/null +++ b/Modules/CetakLabel/Config/config.php @@ -0,0 +1,6 @@ + 'CetakLabel', + 'domain' => 'cetaklabel.io' +]; diff --git a/Modules/CetakLabel/Console/.gitkeep b/Modules/CetakLabel/Console/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/CetakLabel/Database/Migrations/.gitkeep b/Modules/CetakLabel/Database/Migrations/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/CetakLabel/Database/Seeders/.gitkeep b/Modules/CetakLabel/Database/Seeders/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/CetakLabel/Database/Seeders/CetakLabelDatabaseSeeder.php b/Modules/CetakLabel/Database/Seeders/CetakLabelDatabaseSeeder.php new file mode 100644 index 0000000..fcdafba --- /dev/null +++ b/Modules/CetakLabel/Database/Seeders/CetakLabelDatabaseSeeder.php @@ -0,0 +1,21 @@ +call("OthersTableSeeder"); + } +} diff --git a/Modules/CetakLabel/Database/factories/.gitkeep b/Modules/CetakLabel/Database/factories/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/CetakLabel/Entities/.gitkeep b/Modules/CetakLabel/Entities/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/CetakLabel/Http/Controllers/.gitkeep b/Modules/CetakLabel/Http/Controllers/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/CetakLabel/Http/Controllers/CetakLabelController.php b/Modules/CetakLabel/Http/Controllers/CetakLabelController.php new file mode 100644 index 0000000..341b454 --- /dev/null +++ b/Modules/CetakLabel/Http/Controllers/CetakLabelController.php @@ -0,0 +1,79 @@ +sendResponse($directorats, 'Directorats retrieved successfully.'); + } + } diff --git a/Modules/CetakLabel/Http/Middleware/.gitkeep b/Modules/CetakLabel/Http/Middleware/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/CetakLabel/Http/Requests/.gitkeep b/Modules/CetakLabel/Http/Requests/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/CetakLabel/Providers/.gitkeep b/Modules/CetakLabel/Providers/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/CetakLabel/Providers/CetakLabelServiceProvider.php b/Modules/CetakLabel/Providers/CetakLabelServiceProvider.php new file mode 100644 index 0000000..e4b392c --- /dev/null +++ b/Modules/CetakLabel/Providers/CetakLabelServiceProvider.php @@ -0,0 +1,114 @@ +registerTranslations(); + $this->registerConfig(); + $this->registerViews(); + $this->loadMigrationsFrom(module_path($this->moduleName, 'Database/Migrations')); + } + + /** + * Register the service provider. + * + * @return void + */ + public function register() + { + $this->app->register(RouteServiceProvider::class); + } + + /** + * Register config. + * + * @return void + */ + protected function registerConfig() + { + $this->publishes([ + module_path($this->moduleName, 'Config/config.php') => config_path($this->moduleNameLower . '.php'), + ], 'config'); + $this->mergeConfigFrom( + module_path($this->moduleName, 'Config/config.php'), $this->moduleNameLower + ); + } + + /** + * Register views. + * + * @return void + */ + public function registerViews() + { + $viewPath = resource_path('views/modules/' . $this->moduleNameLower); + + $sourcePath = module_path($this->moduleName, 'Resources/views'); + + $this->publishes([ + $sourcePath => $viewPath + ], ['views', $this->moduleNameLower . '-module-views']); + + $this->loadViewsFrom(array_merge($this->getPublishableViewPaths(), [$sourcePath]), $this->moduleNameLower); + } + + /** + * Register translations. + * + * @return void + */ + public function registerTranslations() + { + $langPath = resource_path('lang/modules/' . $this->moduleNameLower); + + if (is_dir($langPath)) { + $this->loadTranslationsFrom($langPath, $this->moduleNameLower); + $this->loadJsonTranslationsFrom($langPath); + } else { + $this->loadTranslationsFrom(module_path($this->moduleName, 'Resources/lang'), $this->moduleNameLower); + $this->loadJsonTranslationsFrom(module_path($this->moduleName, 'Resources/lang')); + } + } + + /** + * Get the services provided by the provider. + * + * @return array + */ + public function provides() + { + return []; + } + + private function getPublishableViewPaths(): array + { + $paths = []; + foreach (\Config::get('view.paths') as $path) { + if (is_dir($path . '/modules/' . $this->moduleNameLower)) { + $paths[] = $path . '/modules/' . $this->moduleNameLower; + } + } + return $paths; + } +} diff --git a/Modules/CetakLabel/Providers/RouteServiceProvider.php b/Modules/CetakLabel/Providers/RouteServiceProvider.php new file mode 100644 index 0000000..6eab28b --- /dev/null +++ b/Modules/CetakLabel/Providers/RouteServiceProvider.php @@ -0,0 +1,69 @@ +mapApiRoutes(); + + $this->mapWebRoutes(); + } + + /** + * Define the "web" routes for the application. + * + * These routes all receive session state, CSRF protection, etc. + * + * @return void + */ + protected function mapWebRoutes() + { + Route::middleware('web') + ->namespace($this->moduleNamespace) + ->group(module_path('CetakLabel', '/Routes/web.php')); + } + + /** + * Define the "api" routes for the application. + * + * These routes are typically stateless. + * + * @return void + */ + protected function mapApiRoutes() + { + Route::prefix('api') + ->middleware('api') + ->namespace($this->moduleNamespace) + ->group(module_path('CetakLabel', '/Routes/api.php')); + } +} diff --git a/Modules/CetakLabel/Resources/assets/.gitkeep b/Modules/CetakLabel/Resources/assets/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/CetakLabel/Resources/assets/js/app.js b/Modules/CetakLabel/Resources/assets/js/app.js new file mode 100644 index 0000000..e69de29 diff --git a/Modules/CetakLabel/Resources/assets/sass/app.scss b/Modules/CetakLabel/Resources/assets/sass/app.scss new file mode 100644 index 0000000..e69de29 diff --git a/Modules/CetakLabel/Resources/lang/.gitkeep b/Modules/CetakLabel/Resources/lang/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/CetakLabel/Resources/views/.gitkeep b/Modules/CetakLabel/Resources/views/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/CetakLabel/Resources/views/index.blade.php b/Modules/CetakLabel/Resources/views/index.blade.php new file mode 100644 index 0000000..083c48a --- /dev/null +++ b/Modules/CetakLabel/Resources/views/index.blade.php @@ -0,0 +1,9 @@ +@extends('cetaklabel::layouts.master') + +@section('content') +

Hello World

+ +

+ This view is loaded from module: {!! config('cetaklabel.name') !!} +

+@endsection diff --git a/Modules/CetakLabel/Resources/views/layouts/master.blade.php b/Modules/CetakLabel/Resources/views/layouts/master.blade.php new file mode 100644 index 0000000..8870bcb --- /dev/null +++ b/Modules/CetakLabel/Resources/views/layouts/master.blade.php @@ -0,0 +1,19 @@ + + + + + + + Module CetakLabel + + {{-- Laravel Vite - CSS File --}} + {{-- {{ module_vite('build-cetaklabel', 'Resources/assets/sass/app.scss') }} --}} + + + + @yield('content') + + {{-- Laravel Vite - JS File --}} + {{-- {{ module_vite('build-cetaklabel', 'Resources/assets/js/app.js') }} --}} + + diff --git a/Modules/CetakLabel/Routes/.gitkeep b/Modules/CetakLabel/Routes/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/CetakLabel/Routes/api.php b/Modules/CetakLabel/Routes/api.php new file mode 100644 index 0000000..0b478d5 --- /dev/null +++ b/Modules/CetakLabel/Routes/api.php @@ -0,0 +1,25 @@ +getLowerName().'.domain'); + + Route::domain($domain)->group(function () { + Route::middleware('auth:sanctum')->group(function () { + Route::resource('directorats', DirectoratController::class); + }); + }); diff --git a/Modules/CetakLabel/Routes/web.php b/Modules/CetakLabel/Routes/web.php new file mode 100644 index 0000000..fb8e080 --- /dev/null +++ b/Modules/CetakLabel/Routes/web.php @@ -0,0 +1,20 @@ +group(function() { + Route::get('/', 'CetakLabelController@index'); +}); + +Route::resource('directorat', DirectoratController::class); diff --git a/Modules/CetakLabel/Tests/Feature/.gitkeep b/Modules/CetakLabel/Tests/Feature/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/CetakLabel/Tests/Unit/.gitkeep b/Modules/CetakLabel/Tests/Unit/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/CetakLabel/composer.json b/Modules/CetakLabel/composer.json new file mode 100644 index 0000000..59effbb --- /dev/null +++ b/Modules/CetakLabel/composer.json @@ -0,0 +1,23 @@ +{ + "name": "nwidart/cetaklabel", + "description": "", + "authors": [ + { + "name": "Nicolas Widart", + "email": "n.widart@gmail.com" + } + ], + "extra": { + "laravel": { + "providers": [], + "aliases": { + + } + } + }, + "autoload": { + "psr-4": { + "Modules\\CetakLabel\\": "" + } + } +} diff --git a/Modules/CetakLabel/module.json b/Modules/CetakLabel/module.json new file mode 100644 index 0000000..db52e94 --- /dev/null +++ b/Modules/CetakLabel/module.json @@ -0,0 +1,11 @@ +{ + "name": "CetakLabel", + "alias": "cetaklabel", + "description": "", + "keywords": [], + "priority": 0, + "providers": [ + "Modules\\CetakLabel\\Providers\\CetakLabelServiceProvider" + ], + "files": [] +} diff --git a/Modules/CetakLabel/package.json b/Modules/CetakLabel/package.json new file mode 100644 index 0000000..30c1a80 --- /dev/null +++ b/Modules/CetakLabel/package.json @@ -0,0 +1,16 @@ +{ + "private": true, + "scripts": { + "dev": "vite", + "build": "vite build" + }, + "devDependencies": { + "axios": "^0.21.4", + "dotenv": "^10.0.0", + "dotenv-expand": "^5.1.0", + "laravel-vite-plugin": "^0.6.0", + "lodash": "^4.17.21", + "postcss": "^8.3.7", + "vite": "^3.0.9" + } +} diff --git a/Modules/CetakLabel/vite.config.js b/Modules/CetakLabel/vite.config.js new file mode 100644 index 0000000..3541234 --- /dev/null +++ b/Modules/CetakLabel/vite.config.js @@ -0,0 +1,24 @@ +const dotenvExpand = require('dotenv-expand'); +dotenvExpand(require('dotenv').config({ path: '../../.env'/*, debug: true*/})); + +import { defineConfig } from 'vite'; +import laravel from 'laravel-vite-plugin'; + +export default defineConfig({ + build: { + outDir: '../../public/build-cetaklabel', + emptyOutDir: true, + manifest: true, + }, + plugins: [ + laravel({ + publicDirectory: '../../public', + buildDirectory: 'build-cetaklabel', + input: [ + __dirname + '/Resources/assets/sass/app.scss', + __dirname + '/Resources/assets/js/app.js' + ], + refresh: true, + }), + ], +}); diff --git a/Modules/hcis.io/Config/.gitkeep b/Modules/hcis.io/Config/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/hcis.io/Console/.gitkeep b/Modules/hcis.io/Console/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/hcis.io/Database/Migrations/.gitkeep b/Modules/hcis.io/Database/Migrations/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/hcis.io/Database/Seeders/.gitkeep b/Modules/hcis.io/Database/Seeders/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/hcis.io/Database/factories/.gitkeep b/Modules/hcis.io/Database/factories/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/hcis.io/Entities/.gitkeep b/Modules/hcis.io/Entities/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/hcis.io/Http/Controllers/.gitkeep b/Modules/hcis.io/Http/Controllers/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/hcis.io/Http/Middleware/.gitkeep b/Modules/hcis.io/Http/Middleware/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/hcis.io/Http/Requests/.gitkeep b/Modules/hcis.io/Http/Requests/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/hcis.io/Providers/.gitkeep b/Modules/hcis.io/Providers/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/hcis.io/Resources/assets/.gitkeep b/Modules/hcis.io/Resources/assets/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/hcis.io/Resources/lang/.gitkeep b/Modules/hcis.io/Resources/lang/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/hcis.io/Resources/views/.gitkeep b/Modules/hcis.io/Resources/views/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/hcis.io/Routes/.gitkeep b/Modules/hcis.io/Routes/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/hcis.io/Tests/Feature/.gitkeep b/Modules/hcis.io/Tests/Feature/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/hcis.io/Tests/Unit/.gitkeep b/Modules/hcis.io/Tests/Unit/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Modules/hcis.io/module.json b/Modules/hcis.io/module.json new file mode 100644 index 0000000..f1c5ea9 --- /dev/null +++ b/Modules/hcis.io/module.json @@ -0,0 +1,11 @@ +{ + "name": "Hcis", + "alias": "hcis", + "description": "", + "keywords": [], + "priority": 0, + "providers": [ + + ], + "files": [] +} diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 82a37e4..b1eac09 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -3,6 +3,7 @@ namespace App\Exceptions; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; +use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Throwable; class Handler extends ExceptionHandler @@ -46,5 +47,14 @@ class Handler extends ExceptionHandler $this->reportable(function (Throwable $e) { // }); + + $this->renderable(function (NotFoundHttpException $e, $request) { + if ($request->is('api/*')) { + return response()->json([ + 'message' => 'Not found.' + ], 404); + } + }); } + } diff --git a/app/Http/Controllers/ApiController.php b/app/Http/Controllers/ApiController.php new file mode 100644 index 0000000..b52db91 --- /dev/null +++ b/app/Http/Controllers/ApiController.php @@ -0,0 +1,43 @@ + true, + 'data' => $result, + 'message' => $message, + ]; + + return response()->json($response, $code); + } + + + /** + * return error response. + * + * @return \Illuminate\Http\Response + */ + public function sendError($error, $errorMessages = [], $code = 404) + { + $response = [ + 'success' => false, + 'message' => $error, + ]; + + if (!empty($errorMessages)) { + $response['data'] = $errorMessages; + } + + return response()->json($response, $code); + } + } diff --git a/app/Http/Controllers/Auth/AuthApiController.php b/app/Http/Controllers/Auth/AuthApiController.php new file mode 100644 index 0000000..3c387be --- /dev/null +++ b/app/Http/Controllers/Auth/AuthApiController.php @@ -0,0 +1,60 @@ +all(), [ + 'name' => 'required', + 'email' => 'required|email', + 'password' => 'required', + 'password_confirmation' => 'required|same:password', + ]); + + if ($validator->fails()) { + return $this->sendError('Validation Error.', $validator->errors()); + } + + $input = $request->all(); + $input['password'] = bcrypt($input['password']); + $user = User::create($input); + $success['token'] = $user->createToken('MyApp')->plainTextToken; + $success['name'] = $user->name; + + return $this->sendResponse($success, 'User register successfully.'); + } + + /** + * Login api + * + * @return \Illuminate\Http\Response + */ + public function login(Request $request) + : JsonResponse + { + if (Auth::attempt(['email' => $request->email, 'password' => $request->password])) { + $user = Auth::user(); + $success['token'] = $user->createToken('MyApp')->plainTextToken; + $success['name'] = $user->name; + + return $this->sendResponse($success, 'User login successfully.'); + } else { + return $this->sendError('Unauthorised.', ['error' => 'Unauthorised']); + } + } + } diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 0079688..bd3139f 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -39,7 +39,7 @@ class Kernel extends HttpKernel ], 'api' => [ - // \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class, + \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class, 'throttle:api', \Illuminate\Routing\Middleware\SubstituteBindings::class, ], diff --git a/composer.json b/composer.json index 8b98480..d0e9c0b 100644 --- a/composer.json +++ b/composer.json @@ -12,9 +12,11 @@ "jackiedo/log-reader": "2.*", "laracasts/flash": "^3.2", "laravel/framework": "^10.0", - "laravel/sanctum": "^3.0", + "laravel/octane": "^1.5", + "laravel/sanctum": "^3.2", "laravel/tinker": "^2.7", "laravelcollective/html": "^6.4", + "nwidart/laravel-modules": "^10.0", "spatie/laravel-activitylog": "^4.7", "spatie/laravel-permission": "^5.10", "wildside/userstamps": "^2.3", @@ -40,7 +42,8 @@ }, "autoload-dev": { "psr-4": { - "Tests\\": "tests/" + "Tests\\": "tests/", + "Modules\\": "Modules/" } }, "scripts": { diff --git a/composer.lock b/composer.lock index 35c169d..58c05c9 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0e87e4f9bda92e486cd97bf407e9f234", + "content-hash": "1313a0e38fcd70f76c758237b1b91d79", "packages": [ { "name": "anlutro/l4-settings", @@ -1214,6 +1214,103 @@ }, "time": "2023-02-18T21:01:57+00:00" }, + { + "name": "laminas/laminas-diactoros", + "version": "2.25.2", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-diactoros.git", + "reference": "9f3f4bf5b99c9538b6f1dbcc20f6fec357914f9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/9f3f4bf5b99c9538b6f1dbcc20f6fec357914f9e", + "reference": "9f3f4bf5b99c9538b6f1dbcc20f6fec357914f9e", + "shasum": "" + }, + "require": { + "php": "~8.0.0 || ~8.1.0 || ~8.2.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.1" + }, + "conflict": { + "zendframework/zend-diactoros": "*" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "ext-curl": "*", + "ext-dom": "*", + "ext-gd": "*", + "ext-libxml": "*", + "http-interop/http-factory-tests": "^0.9.0", + "laminas/laminas-coding-standard": "^2.5", + "php-http/psr7-integration-tests": "^1.2", + "phpunit/phpunit": "^9.5.28", + "psalm/plugin-phpunit": "^0.18.4", + "vimeo/psalm": "^5.6" + }, + "type": "library", + "extra": { + "laminas": { + "config-provider": "Laminas\\Diactoros\\ConfigProvider", + "module": "Laminas\\Diactoros" + } + }, + "autoload": { + "files": [ + "src/functions/create_uploaded_file.php", + "src/functions/marshal_headers_from_sapi.php", + "src/functions/marshal_method_from_sapi.php", + "src/functions/marshal_protocol_version_from_sapi.php", + "src/functions/marshal_uri_from_sapi.php", + "src/functions/normalize_server.php", + "src/functions/normalize_uploaded_files.php", + "src/functions/parse_cookie_header.php", + "src/functions/create_uploaded_file.legacy.php", + "src/functions/marshal_headers_from_sapi.legacy.php", + "src/functions/marshal_method_from_sapi.legacy.php", + "src/functions/marshal_protocol_version_from_sapi.legacy.php", + "src/functions/marshal_uri_from_sapi.legacy.php", + "src/functions/normalize_server.legacy.php", + "src/functions/normalize_uploaded_files.legacy.php", + "src/functions/parse_cookie_header.legacy.php" + ], + "psr-4": { + "Laminas\\Diactoros\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "PSR HTTP Message implementations", + "homepage": "https://laminas.dev", + "keywords": [ + "http", + "laminas", + "psr", + "psr-17", + "psr-7" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-diactoros/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-diactoros/issues", + "rss": "https://github.com/laminas/laminas-diactoros/releases.atom", + "source": "https://github.com/laminas/laminas-diactoros" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2023-04-17T15:44:17+00:00" + }, { "name": "laracasts/flash", "version": "3.2.2", @@ -1273,16 +1370,16 @@ }, { "name": "laravel/framework", - "version": "v10.8.0", + "version": "v10.10.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "317d7ccaeb1bbf4ac3035efe225ef2746c45f3a8" + "reference": "0da22a8d179f79b49d4e71f4822f759651f35012" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/317d7ccaeb1bbf4ac3035efe225ef2746c45f3a8", - "reference": "317d7ccaeb1bbf4ac3035efe225ef2746c45f3a8", + "url": "https://api.github.com/repos/laravel/framework/zipball/0da22a8d179f79b49d4e71f4822f759651f35012", + "reference": "0da22a8d179f79b49d4e71f4822f759651f35012", "shasum": "" }, "require": { @@ -1469,20 +1566,101 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2023-04-18T13:45:33+00:00" + "time": "2023-05-09T13:08:05+00:00" }, { - "name": "laravel/sanctum", - "version": "v3.2.1", + "name": "laravel/octane", + "version": "v1.5.5", "source": { "type": "git", - "url": "https://github.com/laravel/sanctum.git", - "reference": "d09d69bac55708fcd4a3b305d760e673d888baf9" + "url": "https://github.com/laravel/octane.git", + "reference": "2568cc372372b31db01588a8d9e0fb2b6d76aad6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/sanctum/zipball/d09d69bac55708fcd4a3b305d760e673d888baf9", - "reference": "d09d69bac55708fcd4a3b305d760e673d888baf9", + "url": "https://api.github.com/repos/laravel/octane/zipball/2568cc372372b31db01588a8d9e0fb2b6d76aad6", + "reference": "2568cc372372b31db01588a8d9e0fb2b6d76aad6", + "shasum": "" + }, + "require": { + "laminas/laminas-diactoros": "^2.5", + "laravel/framework": "^8.83.26|^9.38.0|^10.0", + "laravel/serializable-closure": "^1.0", + "nesbot/carbon": "^2.60", + "php": "^8.0", + "symfony/psr-http-message-bridge": "^2.0" + }, + "require-dev": { + "guzzlehttp/guzzle": "^7.2", + "inertiajs/inertia-laravel": "^0.6.9", + "laravel/scout": "^9.8", + "laravel/socialite": "^5.6", + "livewire/livewire": "^2.12", + "mockery/mockery": "^1.4", + "nunomaduro/collision": "^5.10|^6.0|^7.0", + "orchestra/testbench": "^6.16|^7.0|^8.0", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^9.3", + "spiral/roadrunner": "^2.8.2" + }, + "bin": [ + "bin/roadrunner-worker", + "bin/swoole-server" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + }, + "laravel": { + "providers": [ + "Laravel\\Octane\\OctaneServiceProvider" + ], + "aliases": { + "Octane": "Laravel\\Octane\\Facades\\Octane" + } + } + }, + "autoload": { + "psr-4": { + "Laravel\\Octane\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Supercharge your Laravel application's performance.", + "keywords": [ + "laravel", + "octane", + "roadrunner", + "swoole" + ], + "support": { + "issues": "https://github.com/laravel/octane/issues", + "source": "https://github.com/laravel/octane" + }, + "time": "2023-05-04T15:10:40+00:00" + }, + { + "name": "laravel/sanctum", + "version": "v3.2.5", + "source": { + "type": "git", + "url": "https://github.com/laravel/sanctum.git", + "reference": "8ebda85d59d3c414863a7f4d816ef8302faad876" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/sanctum/zipball/8ebda85d59d3c414863a7f4d816ef8302faad876", + "reference": "8ebda85d59d3c414863a7f4d816ef8302faad876", "shasum": "" }, "require": { @@ -1496,6 +1674,7 @@ "require-dev": { "mockery/mockery": "^1.0", "orchestra/testbench": "^7.0|^8.0", + "phpstan/phpstan": "^1.10", "phpunit/phpunit": "^9.3" }, "type": "library", @@ -1534,7 +1713,7 @@ "issues": "https://github.com/laravel/sanctum/issues", "source": "https://github.com/laravel/sanctum" }, - "time": "2023-01-13T15:41:49+00:00" + "time": "2023-05-01T19:39:51+00:00" }, { "name": "laravel/serializable-closure", @@ -1927,19 +2106,20 @@ }, { "name": "league/flysystem", - "version": "3.14.0", + "version": "3.15.1", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "e2a279d7f47d9098e479e8b21f7fb8b8de230158" + "reference": "a141d430414fcb8bf797a18716b09f759a385bed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/e2a279d7f47d9098e479e8b21f7fb8b8de230158", - "reference": "e2a279d7f47d9098e479e8b21f7fb8b8de230158", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/a141d430414fcb8bf797a18716b09f759a385bed", + "reference": "a141d430414fcb8bf797a18716b09f759a385bed", "shasum": "" }, "require": { + "league/flysystem-local": "^3.0.0", "league/mime-type-detection": "^1.0.0", "php": "^8.0.2" }, @@ -1998,7 +2178,7 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/3.14.0" + "source": "https://github.com/thephpleague/flysystem/tree/3.15.1" }, "funding": [ { @@ -2010,7 +2190,67 @@ "type": "github" } ], - "time": "2023-04-11T18:11:47+00:00" + "time": "2023-05-04T09:04:26+00:00" + }, + { + "name": "league/flysystem-local", + "version": "3.15.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem-local.git", + "reference": "543f64c397fefdf9cfeac443ffb6beff602796b3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/543f64c397fefdf9cfeac443ffb6beff602796b3", + "reference": "543f64c397fefdf9cfeac443ffb6beff602796b3", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "league/flysystem": "^3.0.0", + "league/mime-type-detection": "^1.0.0", + "php": "^8.0.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Flysystem\\Local\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "Local filesystem adapter for Flysystem.", + "keywords": [ + "Flysystem", + "file", + "files", + "filesystem", + "local" + ], + "support": { + "issues": "https://github.com/thephpleague/flysystem-local/issues", + "source": "https://github.com/thephpleague/flysystem-local/tree/3.15.0" + }, + "funding": [ + { + "url": "https://ecologi.com/frankdejonge", + "type": "custom" + }, + { + "url": "https://github.com/frankdejonge", + "type": "github" + } + ], + "time": "2023-05-02T20:02:14+00:00" }, { "name": "league/fractal", @@ -2953,6 +3193,87 @@ ], "time": "2023-02-08T01:06:31+00:00" }, + { + "name": "nwidart/laravel-modules", + "version": "v10.0.0", + "source": { + "type": "git", + "url": "https://github.com/nWidart/laravel-modules.git", + "reference": "35e514f13cb8ae8dce093e9794785fea27319d81" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nWidart/laravel-modules/zipball/35e514f13cb8ae8dce093e9794785fea27319d81", + "reference": "35e514f13cb8ae8dce093e9794785fea27319d81", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": ">=8.1" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.6", + "laravel/framework": "^10.0", + "mockery/mockery": "^1.5", + "orchestra/testbench": "^8.0", + "phpstan/phpstan": "^1.4", + "phpunit/phpunit": "^10.0", + "spatie/phpunit-snapshot-assertions": "^5.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Nwidart\\Modules\\LaravelModulesServiceProvider" + ], + "aliases": { + "Module": "Nwidart\\Modules\\Facades\\Module" + } + }, + "branch-alias": { + "dev-master": "10.0-dev" + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Nwidart\\Modules\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Widart", + "email": "n.widart@gmail.com", + "homepage": "https://nicolaswidart.com", + "role": "Developer" + } + ], + "description": "Laravel Module management", + "keywords": [ + "laravel", + "module", + "modules", + "nwidart", + "rad" + ], + "support": { + "issues": "https://github.com/nWidart/laravel-modules/issues", + "source": "https://github.com/nWidart/laravel-modules/tree/v10.0.0" + }, + "funding": [ + { + "url": "https://github.com/nwidart", + "type": "github" + } + ], + "time": "2023-02-16T11:08:15+00:00" + }, { "name": "openspout/openspout", "version": "v4.13.1", @@ -3592,16 +3913,16 @@ }, { "name": "psy/psysh", - "version": "v0.11.15", + "version": "v0.11.17", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "5350ce0ec8ecf2c5b5cf554cd2496f97b444af85" + "reference": "3dc5d4018dabd80bceb8fe1e3191ba8460569f0a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/5350ce0ec8ecf2c5b5cf554cd2496f97b444af85", - "reference": "5350ce0ec8ecf2c5b5cf554cd2496f97b444af85", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/3dc5d4018dabd80bceb8fe1e3191ba8460569f0a", + "reference": "3dc5d4018dabd80bceb8fe1e3191ba8460569f0a", "shasum": "" }, "require": { @@ -3662,9 +3983,9 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.11.15" + "source": "https://github.com/bobthecow/psysh/tree/v0.11.17" }, - "time": "2023-04-07T21:57:09+00:00" + "time": "2023-05-05T20:02:42+00:00" }, { "name": "ralouphie/getallheaders", @@ -3984,16 +4305,16 @@ }, { "name": "spatie/laravel-package-tools", - "version": "1.14.2", + "version": "1.15.0", "source": { "type": "git", "url": "https://github.com/spatie/laravel-package-tools.git", - "reference": "bab62023a4745a61170ad5424184533685e73c2d" + "reference": "efab1844b8826443135201c4443690f032c3d533" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/bab62023a4745a61170ad5424184533685e73c2d", - "reference": "bab62023a4745a61170ad5424184533685e73c2d", + "url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/efab1844b8826443135201c4443690f032c3d533", + "reference": "efab1844b8826443135201c4443690f032c3d533", "shasum": "" }, "require": { @@ -4032,7 +4353,7 @@ ], "support": { "issues": "https://github.com/spatie/laravel-package-tools/issues", - "source": "https://github.com/spatie/laravel-package-tools/tree/1.14.2" + "source": "https://github.com/spatie/laravel-package-tools/tree/1.15.0" }, "funding": [ { @@ -4040,7 +4361,7 @@ "type": "github" } ], - "time": "2023-03-14T16:41:21+00:00" + "time": "2023-04-27T08:09:01+00:00" }, { "name": "spatie/laravel-permission", @@ -4126,16 +4447,16 @@ }, { "name": "symfony/console", - "version": "v6.2.8", + "version": "v6.2.10", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "3582d68a64a86ec25240aaa521ec8bc2342b369b" + "reference": "12288d9f4500f84a4d02254d4aa968b15488476f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/3582d68a64a86ec25240aaa521ec8bc2342b369b", - "reference": "3582d68a64a86ec25240aaa521ec8bc2342b369b", + "url": "https://api.github.com/repos/symfony/console/zipball/12288d9f4500f84a4d02254d4aa968b15488476f", + "reference": "12288d9f4500f84a4d02254d4aa968b15488476f", "shasum": "" }, "require": { @@ -4202,7 +4523,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.2.8" + "source": "https://github.com/symfony/console/tree/v6.2.10" }, "funding": [ { @@ -4218,7 +4539,7 @@ "type": "tidelift" } ], - "time": "2023-03-29T21:42:15+00:00" + "time": "2023-04-28T13:37:43+00:00" }, { "name": "symfony/css-selector", @@ -4354,16 +4675,16 @@ }, { "name": "symfony/error-handler", - "version": "v6.2.9", + "version": "v6.2.10", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "e95f1273b3953c3b5e5341172dae838bacee11ee" + "reference": "8b7e9f124640cb0611624a9383176c3e5f7d8cfb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/e95f1273b3953c3b5e5341172dae838bacee11ee", - "reference": "e95f1273b3953c3b5e5341172dae838bacee11ee", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/8b7e9f124640cb0611624a9383176c3e5f7d8cfb", + "reference": "8b7e9f124640cb0611624a9383176c3e5f7d8cfb", "shasum": "" }, "require": { @@ -4405,7 +4726,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v6.2.9" + "source": "https://github.com/symfony/error-handler/tree/v6.2.10" }, "funding": [ { @@ -4421,7 +4742,7 @@ "type": "tidelift" } ], - "time": "2023-04-11T16:03:19+00:00" + "time": "2023-04-18T13:46:08+00:00" }, { "name": "symfony/event-dispatcher", @@ -4651,16 +4972,16 @@ }, { "name": "symfony/http-foundation", - "version": "v6.2.8", + "version": "v6.2.10", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "511a524affeefc191939348823ac75e9921c2112" + "reference": "49adbb92bcb4e3c2943719d2756271e8b9602acc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/511a524affeefc191939348823ac75e9921c2112", - "reference": "511a524affeefc191939348823ac75e9921c2112", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/49adbb92bcb4e3c2943719d2756271e8b9602acc", + "reference": "49adbb92bcb4e3c2943719d2756271e8b9602acc", "shasum": "" }, "require": { @@ -4709,7 +5030,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v6.2.8" + "source": "https://github.com/symfony/http-foundation/tree/v6.2.10" }, "funding": [ { @@ -4725,20 +5046,20 @@ "type": "tidelift" } ], - "time": "2023-03-29T21:42:15+00:00" + "time": "2023-04-18T13:46:08+00:00" }, { "name": "symfony/http-kernel", - "version": "v6.2.9", + "version": "v6.2.10", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "02246510cf7031726f7237138d61b796b95799b3" + "reference": "81064a65a5496f17d2b6984f6519406f98864215" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/02246510cf7031726f7237138d61b796b95799b3", - "reference": "02246510cf7031726f7237138d61b796b95799b3", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/81064a65a5496f17d2b6984f6519406f98864215", + "reference": "81064a65a5496f17d2b6984f6519406f98864215", "shasum": "" }, "require": { @@ -4820,7 +5141,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v6.2.9" + "source": "https://github.com/symfony/http-kernel/tree/v6.2.10" }, "funding": [ { @@ -4836,7 +5157,7 @@ "type": "tidelift" } ], - "time": "2023-04-13T16:41:43+00:00" + "time": "2023-04-28T13:50:28+00:00" }, { "name": "symfony/mailer", @@ -4919,16 +5240,16 @@ }, { "name": "symfony/mime", - "version": "v6.2.7", + "version": "v6.2.10", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "62e341f80699badb0ad70b31149c8df89a2d778e" + "reference": "b6c137fc53a9f7c4c951cd3f362b3734c7a97723" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/62e341f80699badb0ad70b31149c8df89a2d778e", - "reference": "62e341f80699badb0ad70b31149c8df89a2d778e", + "url": "https://api.github.com/repos/symfony/mime/zipball/b6c137fc53a9f7c4c951cd3f362b3734c7a97723", + "reference": "b6c137fc53a9f7c4c951cd3f362b3734c7a97723", "shasum": "" }, "require": { @@ -4982,7 +5303,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v6.2.7" + "source": "https://github.com/symfony/mime/tree/v6.2.10" }, "funding": [ { @@ -4998,7 +5319,7 @@ "type": "tidelift" } ], - "time": "2023-02-24T10:42:00+00:00" + "time": "2023-04-19T09:54:16+00:00" }, { "name": "symfony/polyfill-ctype", @@ -5660,16 +5981,16 @@ }, { "name": "symfony/process", - "version": "v6.2.8", + "version": "v6.2.10", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "75ed64103df4f6615e15a7fe38b8111099f47416" + "reference": "b34cdbc9c5e75d45a3703e63a48ad07aafa8bf2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/75ed64103df4f6615e15a7fe38b8111099f47416", - "reference": "75ed64103df4f6615e15a7fe38b8111099f47416", + "url": "https://api.github.com/repos/symfony/process/zipball/b34cdbc9c5e75d45a3703e63a48ad07aafa8bf2e", + "reference": "b34cdbc9c5e75d45a3703e63a48ad07aafa8bf2e", "shasum": "" }, "require": { @@ -5701,7 +6022,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.2.8" + "source": "https://github.com/symfony/process/tree/v6.2.10" }, "funding": [ { @@ -5717,7 +6038,95 @@ "type": "tidelift" } ], - "time": "2023-03-09T16:20:02+00:00" + "time": "2023-04-18T13:56:57+00:00" + }, + { + "name": "symfony/psr-http-message-bridge", + "version": "v2.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/psr-http-message-bridge.git", + "reference": "28a732c05bbad801304ad5a5c674cf2970508993" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/28a732c05bbad801304ad5a5c674cf2970508993", + "reference": "28a732c05bbad801304ad5a5c674cf2970508993", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/http-message": "^1.0 || ^2.0", + "symfony/http-foundation": "^5.4 || ^6.0" + }, + "require-dev": { + "nyholm/psr7": "^1.1", + "psr/log": "^1.1 || ^2 || ^3", + "symfony/browser-kit": "^5.4 || ^6.0", + "symfony/config": "^5.4 || ^6.0", + "symfony/event-dispatcher": "^5.4 || ^6.0", + "symfony/framework-bundle": "^5.4 || ^6.0", + "symfony/http-kernel": "^5.4 || ^6.0", + "symfony/phpunit-bridge": "^6.2" + }, + "suggest": { + "nyholm/psr7": "For a super lightweight PSR-7/17 implementation" + }, + "type": "symfony-bridge", + "extra": { + "branch-alias": { + "dev-main": "2.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Bridge\\PsrHttpMessage\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + } + ], + "description": "PSR HTTP message bridge", + "homepage": "http://symfony.com", + "keywords": [ + "http", + "http-message", + "psr-17", + "psr-7" + ], + "support": { + "issues": "https://github.com/symfony/psr-http-message-bridge/issues", + "source": "https://github.com/symfony/psr-http-message-bridge/tree/v2.2.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-04-21T08:40:19+00:00" }, { "name": "symfony/routing", @@ -6233,16 +6642,16 @@ }, { "name": "symfony/var-dumper", - "version": "v6.2.8", + "version": "v6.2.10", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "d37ab6787be2db993747b6218fcc96e8e3bb4bd0" + "reference": "41a750a23412ca76fdbbf5096943b4134272c1ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/d37ab6787be2db993747b6218fcc96e8e3bb4bd0", - "reference": "d37ab6787be2db993747b6218fcc96e8e3bb4bd0", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/41a750a23412ca76fdbbf5096943b4134272c1ab", + "reference": "41a750a23412ca76fdbbf5096943b4134272c1ab", "shasum": "" }, "require": { @@ -6301,7 +6710,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.2.8" + "source": "https://github.com/symfony/var-dumper/tree/v6.2.10" }, "funding": [ { @@ -6317,7 +6726,7 @@ "type": "tidelift" } ], - "time": "2023-03-29T21:42:15+00:00" + "time": "2023-04-18T13:46:08+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -7410,16 +7819,16 @@ }, { "name": "laravel/pint", - "version": "v1.9.0", + "version": "v1.10.0", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "eac5ec3d6b5c96543c682e309a10fdddc9f61d80" + "reference": "c7a01fa9bdd79819e7a2f1ba63ac1b02e6692dbc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/eac5ec3d6b5c96543c682e309a10fdddc9f61d80", - "reference": "eac5ec3d6b5c96543c682e309a10fdddc9f61d80", + "url": "https://api.github.com/repos/laravel/pint/zipball/c7a01fa9bdd79819e7a2f1ba63ac1b02e6692dbc", + "reference": "c7a01fa9bdd79819e7a2f1ba63ac1b02e6692dbc", "shasum": "" }, "require": { @@ -7472,20 +7881,20 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2023-04-18T14:50:44+00:00" + "time": "2023-04-25T14:52:30+00:00" }, { "name": "laravel/sail", - "version": "v1.21.4", + "version": "v1.21.5", "source": { "type": "git", "url": "https://github.com/laravel/sail.git", - "reference": "5e59b4a57181020477e2b18943b27493638e3f89" + "reference": "27af207bb1c53faddcba34c7528b3e969f6a646d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/sail/zipball/5e59b4a57181020477e2b18943b27493638e3f89", - "reference": "5e59b4a57181020477e2b18943b27493638e3f89", + "url": "https://api.github.com/repos/laravel/sail/zipball/27af207bb1c53faddcba34c7528b3e969f6a646d", + "reference": "27af207bb1c53faddcba34c7528b3e969f6a646d", "shasum": "" }, "require": { @@ -7537,7 +7946,7 @@ "issues": "https://github.com/laravel/sail/issues", "source": "https://github.com/laravel/sail" }, - "time": "2023-03-30T12:28:55+00:00" + "time": "2023-04-24T13:29:38+00:00" }, { "name": "mockery/mockery", @@ -7957,16 +8366,16 @@ }, { "name": "phpunit/php-file-iterator", - "version": "4.0.1", + "version": "4.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "fd9329ab3368f59fe1fe808a189c51086bd4b6bd" + "reference": "5647d65443818959172645e7ed999217360654b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/fd9329ab3368f59fe1fe808a189c51086bd4b6bd", - "reference": "fd9329ab3368f59fe1fe808a189c51086bd4b6bd", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/5647d65443818959172645e7ed999217360654b6", + "reference": "5647d65443818959172645e7ed999217360654b6", "shasum": "" }, "require": { @@ -8005,7 +8414,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.0.1" + "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.0.2" }, "funding": [ { @@ -8013,7 +8423,7 @@ "type": "github" } ], - "time": "2023-02-10T16:53:14+00:00" + "time": "2023-05-07T09:13:23+00:00" }, { "name": "phpunit/php-invoker", @@ -8599,16 +9009,16 @@ }, { "name": "sebastian/diff", - "version": "5.0.1", + "version": "5.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "aae9a0a43bff37bd5d8d0311426c87bf36153f02" + "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/aae9a0a43bff37bd5d8d0311426c87bf36153f02", - "reference": "aae9a0a43bff37bd5d8d0311426c87bf36153f02", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/912dc2fbe3e3c1e7873313cc801b100b6c68c87b", + "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b", "shasum": "" }, "require": { @@ -8654,7 +9064,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", "security": "https://github.com/sebastianbergmann/diff/security/policy", - "source": "https://github.com/sebastianbergmann/diff/tree/5.0.1" + "source": "https://github.com/sebastianbergmann/diff/tree/5.0.3" }, "funding": [ { @@ -8662,7 +9072,7 @@ "type": "github" } ], - "time": "2023-03-23T05:12:41+00:00" + "time": "2023-05-01T07:48:21+00:00" }, { "name": "sebastian/environment", @@ -9340,16 +9750,16 @@ }, { "name": "spatie/ignition", - "version": "1.5.0", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/spatie/ignition.git", - "reference": "4db9c9626e4d7745efbe0b512157326190b41b65" + "reference": "f747d83c6d7cb6229b462f3ddbb3a82dc0db0f78" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/ignition/zipball/4db9c9626e4d7745efbe0b512157326190b41b65", - "reference": "4db9c9626e4d7745efbe0b512157326190b41b65", + "url": "https://api.github.com/repos/spatie/ignition/zipball/f747d83c6d7cb6229b462f3ddbb3a82dc0db0f78", + "reference": "f747d83c6d7cb6229b462f3ddbb3a82dc0db0f78", "shasum": "" }, "require": { @@ -9380,7 +9790,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.4.x-dev" + "dev-main": "1.5.x-dev" } }, "autoload": { @@ -9419,20 +9829,20 @@ "type": "github" } ], - "time": "2023-04-12T09:07:50+00:00" + "time": "2023-05-04T13:20:26+00:00" }, { "name": "spatie/laravel-ignition", - "version": "2.1.0", + "version": "2.1.2", "source": { "type": "git", "url": "https://github.com/spatie/laravel-ignition.git", - "reference": "3718dfb91bc5aff340af26507a61f0f9605f81e8" + "reference": "2f99fa6b732a6049e78ed34e4608ce589605ae54" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/3718dfb91bc5aff340af26507a61f0f9605f81e8", - "reference": "3718dfb91bc5aff340af26507a61f0f9605f81e8", + "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/2f99fa6b732a6049e78ed34e4608ce589605ae54", + "reference": "2f99fa6b732a6049e78ed34e4608ce589605ae54", "shasum": "" }, "require": { @@ -9511,20 +9921,20 @@ "type": "github" } ], - "time": "2023-04-12T09:26:00+00:00" + "time": "2023-05-09T07:19:31+00:00" }, { "name": "symfony/yaml", - "version": "v6.2.7", + "version": "v6.2.10", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "e8e6a1d59e050525f27a1f530aa9703423cb7f57" + "reference": "61916f3861b1e9705b18cfde723921a71dd1559d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/e8e6a1d59e050525f27a1f530aa9703423cb7f57", - "reference": "e8e6a1d59e050525f27a1f530aa9703423cb7f57", + "url": "https://api.github.com/repos/symfony/yaml/zipball/61916f3861b1e9705b18cfde723921a71dd1559d", + "reference": "61916f3861b1e9705b18cfde723921a71dd1559d", "shasum": "" }, "require": { @@ -9569,7 +9979,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v6.2.7" + "source": "https://github.com/symfony/yaml/tree/v6.2.10" }, "funding": [ { @@ -9585,7 +9995,7 @@ "type": "tidelift" } ], - "time": "2023-02-16T09:57:23+00:00" + "time": "2023-04-28T13:25:36+00:00" }, { "name": "theseer/tokenizer", diff --git a/config/modules.php b/config/modules.php new file mode 100644 index 0000000..0936d18 --- /dev/null +++ b/config/modules.php @@ -0,0 +1,277 @@ + 'Modules', + + /* + |-------------------------------------------------------------------------- + | Module Stubs + |-------------------------------------------------------------------------- + | + | Default module stubs. + | + */ + + 'stubs' => [ + 'enabled' => false, + 'path' => base_path('vendor/nwidart/laravel-modules/src/Commands/stubs'), + 'files' => [ + 'routes/web' => 'Routes/web.php', + 'routes/api' => 'Routes/api.php', + 'views/index' => 'Resources/views/index.blade.php', + 'views/master' => 'Resources/views/layouts/master.blade.php', + 'scaffold/config' => 'Config/config.php', + 'composer' => 'composer.json', + 'assets/js/app' => 'Resources/assets/js/app.js', + 'assets/sass/app' => 'Resources/assets/sass/app.scss', + 'vite' => 'vite.config.js', + 'package' => 'package.json', + ], + 'replacements' => [ + 'routes/web' => ['LOWER_NAME', 'STUDLY_NAME'], + 'routes/api' => ['LOWER_NAME'], + 'vite' => ['LOWER_NAME'], + 'json' => ['LOWER_NAME', 'STUDLY_NAME', 'MODULE_NAMESPACE', 'PROVIDER_NAMESPACE'], + 'views/index' => ['LOWER_NAME'], + 'views/master' => ['LOWER_NAME', 'STUDLY_NAME'], + 'scaffold/config' => ['STUDLY_NAME'], + 'composer' => [ + 'LOWER_NAME', + 'STUDLY_NAME', + 'VENDOR', + 'AUTHOR_NAME', + 'AUTHOR_EMAIL', + 'MODULE_NAMESPACE', + 'PROVIDER_NAMESPACE', + ], + ], + 'gitkeep' => true, + ], + 'paths' => [ + /* + |-------------------------------------------------------------------------- + | Modules path + |-------------------------------------------------------------------------- + | + | This path used for save the generated module. This path also will be added + | automatically to list of scanned folders. + | + */ + + 'modules' => base_path('Modules'), + /* + |-------------------------------------------------------------------------- + | Modules assets path + |-------------------------------------------------------------------------- + | + | Here you may update the modules assets path. + | + */ + + 'assets' => public_path('modules'), + /* + |-------------------------------------------------------------------------- + | The migrations path + |-------------------------------------------------------------------------- + | + | Where you run 'module:publish-migration' command, where do you publish the + | the migration files? + | + */ + + 'migration' => base_path('database/migrations'), + /* + |-------------------------------------------------------------------------- + | Generator path + |-------------------------------------------------------------------------- + | Customise the paths where the folders will be generated. + | Set the generate key to false to not generate that folder + */ + 'generator' => [ + 'config' => ['path' => 'Config', 'generate' => true], + 'command' => ['path' => 'Console', 'generate' => true], + 'migration' => ['path' => 'Database/Migrations', 'generate' => true], + 'seeder' => ['path' => 'Database/Seeders', 'generate' => true], + 'factory' => ['path' => 'Database/factories', 'generate' => true], + 'model' => ['path' => 'Entities', 'generate' => true], + 'routes' => ['path' => 'Routes', 'generate' => true], + 'controller' => ['path' => 'Http/Controllers', 'generate' => true], + 'filter' => ['path' => 'Http/Middleware', 'generate' => true], + 'request' => ['path' => 'Http/Requests', 'generate' => true], + 'provider' => ['path' => 'Providers', 'generate' => true], + 'assets' => ['path' => 'Resources/assets', 'generate' => true], + 'lang' => ['path' => 'Resources/lang', 'generate' => true], + 'views' => ['path' => 'Resources/views', 'generate' => true], + 'test' => ['path' => 'Tests/Unit', 'generate' => true], + 'test-feature' => ['path' => 'Tests/Feature', 'generate' => true], + 'repository' => ['path' => 'Repositories', 'generate' => false], + 'event' => ['path' => 'Events', 'generate' => false], + 'listener' => ['path' => 'Listeners', 'generate' => false], + 'policies' => ['path' => 'Policies', 'generate' => false], + 'rules' => ['path' => 'Rules', 'generate' => false], + 'jobs' => ['path' => 'Jobs', 'generate' => false], + 'emails' => ['path' => 'Emails', 'generate' => false], + 'notifications' => ['path' => 'Notifications', 'generate' => false], + 'resource' => ['path' => 'Transformers', 'generate' => false], + 'component-view' => ['path' => 'Resources/views/components', 'generate' => false], + 'component-class' => ['path' => 'View/Components', 'generate' => false], + ], + ], + + /* + |-------------------------------------------------------------------------- + | Package commands + |-------------------------------------------------------------------------- + | + | Here you can define which commands will be visible and used in your + | application. If for example you don't use some of the commands provided + | you can simply comment them out. + | + */ + 'commands' => [ + Commands\CommandMakeCommand::class, + Commands\ComponentClassMakeCommand::class, + Commands\ComponentViewMakeCommand::class, + Commands\ControllerMakeCommand::class, + Commands\DisableCommand::class, + Commands\DumpCommand::class, + Commands\EnableCommand::class, + Commands\EventMakeCommand::class, + Commands\JobMakeCommand::class, + Commands\ListenerMakeCommand::class, + Commands\MailMakeCommand::class, + Commands\MiddlewareMakeCommand::class, + Commands\NotificationMakeCommand::class, + Commands\ProviderMakeCommand::class, + Commands\RouteProviderMakeCommand::class, + Commands\InstallCommand::class, + Commands\ListCommand::class, + Commands\ModuleDeleteCommand::class, + Commands\ModuleMakeCommand::class, + Commands\FactoryMakeCommand::class, + Commands\PolicyMakeCommand::class, + Commands\RequestMakeCommand::class, + Commands\RuleMakeCommand::class, + Commands\MigrateCommand::class, + Commands\MigrateFreshCommand::class, + Commands\MigrateRefreshCommand::class, + Commands\MigrateResetCommand::class, + Commands\MigrateRollbackCommand::class, + Commands\MigrateStatusCommand::class, + Commands\MigrationMakeCommand::class, + Commands\ModelMakeCommand::class, + Commands\PublishCommand::class, + Commands\PublishConfigurationCommand::class, + Commands\PublishMigrationCommand::class, + Commands\PublishTranslationCommand::class, + Commands\SeedCommand::class, + Commands\SeedMakeCommand::class, + Commands\SetupCommand::class, + Commands\UnUseCommand::class, + Commands\UpdateCommand::class, + Commands\UseCommand::class, + Commands\ResourceMakeCommand::class, + Commands\TestMakeCommand::class, + Commands\LaravelModulesV6Migrator::class, + ], + + /* + |-------------------------------------------------------------------------- + | Scan Path + |-------------------------------------------------------------------------- + | + | Here you define which folder will be scanned. By default will scan vendor + | directory. This is useful if you host the package in packagist website. + | + */ + + 'scan' => [ + 'enabled' => false, + 'paths' => [ + base_path('vendor/*/*'), + ], + ], + /* + |-------------------------------------------------------------------------- + | Composer File Template + |-------------------------------------------------------------------------- + | + | Here is the config for composer.json file, generated by this package + | + */ + + 'composer' => [ + 'vendor' => 'nwidart', + 'author' => [ + 'name' => 'Nicolas Widart', + 'email' => 'n.widart@gmail.com', + ], + 'composer-output' => false, + ], + + /* + |-------------------------------------------------------------------------- + | Caching + |-------------------------------------------------------------------------- + | + | Here is the config for setting up caching feature. + | + */ + 'cache' => [ + 'enabled' => false, + 'driver' => 'file', + 'key' => 'laravel-modules', + 'lifetime' => 60, + ], + /* + |-------------------------------------------------------------------------- + | Choose what laravel-modules will register as custom namespaces. + | Setting one to false will require you to register that part + | in your own Service Provider class. + |-------------------------------------------------------------------------- + */ + 'register' => [ + 'translations' => true, + /** + * load files on boot or register method + * + * Note: boot not compatible with asgardcms + * + * @example boot|register + */ + 'files' => 'register', + ], + + /* + |-------------------------------------------------------------------------- + | Activators + |-------------------------------------------------------------------------- + | + | You can define new types of activators here, file, database etc. The only + | required parameter is 'class'. + | The file activator will store the activation status in storage/installed_modules + */ + 'activators' => [ + 'file' => [ + 'class' => FileActivator::class, + 'statuses-file' => base_path('modules_statuses.json'), + 'cache-key' => 'activator.installed', + 'cache-lifetime' => 604800, + ], + ], + + 'activator' => 'file', +]; diff --git a/config/octane.php b/config/octane.php new file mode 100644 index 0000000..eb6fc91 --- /dev/null +++ b/config/octane.php @@ -0,0 +1,228 @@ + env('OCTANE_SERVER', 'roadrunner'), + + /* + |-------------------------------------------------------------------------- + | Force HTTPS + |-------------------------------------------------------------------------- + | + | When this configuration value is set to "true", Octane will inform the + | framework that all absolute links must be generated using the HTTPS + | protocol. Otherwise your links may be generated using plain HTTP. + | + */ + + 'https' => env('OCTANE_HTTPS', false), + + /* + |-------------------------------------------------------------------------- + | Octane Listeners + |-------------------------------------------------------------------------- + | + | All of the event listeners for Octane's events are defined below. These + | listeners are responsible for resetting your application's state for + | the next request. You may even add your own listeners to the list. + | + */ + + 'listeners' => [ + WorkerStarting::class => [ + EnsureUploadedFilesAreValid::class, + EnsureUploadedFilesCanBeMoved::class, + ], + + RequestReceived::class => [ + ...Octane::prepareApplicationForNextOperation(), + ...Octane::prepareApplicationForNextRequest(), + // + ], + + RequestHandled::class => [ + // + ], + + RequestTerminated::class => [ + // FlushUploadedFiles::class, + ], + + TaskReceived::class => [ + ...Octane::prepareApplicationForNextOperation(), + // + ], + + TaskTerminated::class => [ + // + ], + + TickReceived::class => [ + ...Octane::prepareApplicationForNextOperation(), + // + ], + + TickTerminated::class => [ + // + ], + + OperationTerminated::class => [ + FlushTemporaryContainerInstances::class, + // DisconnectFromDatabases::class, + // CollectGarbage::class, + ], + + WorkerErrorOccurred::class => [ + ReportException::class, + StopWorkerIfNecessary::class, + ], + + WorkerStopping::class => [ + // + ], + ], + + /* + |-------------------------------------------------------------------------- + | Warm / Flush Bindings + |-------------------------------------------------------------------------- + | + | The bindings listed below will either be pre-warmed when a worker boots + | or they will be flushed before every new request. Flushing a binding + | will force the container to resolve that binding again when asked. + | + */ + + 'warm' => [ + ...Octane::defaultServicesToWarm(), + ], + + 'flush' => [ + // + ], + + /* + |-------------------------------------------------------------------------- + | Octane Cache Table + |-------------------------------------------------------------------------- + | + | While using Swoole, you may leverage the Octane cache, which is powered + | by a Swoole table. You may set the maximum number of rows as well as + | the number of bytes per row using the configuration options below. + | + */ + + 'cache' => [ + 'rows' => 1000, + 'bytes' => 10000, + ], + + /* + |-------------------------------------------------------------------------- + | Octane Swoole Tables + |-------------------------------------------------------------------------- + | + | While using Swoole, you may define additional tables as required by the + | application. These tables can be used to store data that needs to be + | quickly accessed by other workers on the particular Swoole server. + | + */ + + 'tables' => [ + 'example:1000' => [ + 'name' => 'string:1000', + 'votes' => 'int', + ], + ], + + /* + |-------------------------------------------------------------------------- + | File Watching + |-------------------------------------------------------------------------- + | + | The following list of files and directories will be watched when using + | the --watch option offered by Octane. If any of the directories and + | files are changed, Octane will automatically reload your workers. + | + */ + + 'watch' => [ + 'app', + 'bootstrap', + 'config', + 'database', + 'public/**/*.php', + 'resources/**/*.php', + 'routes', + 'composer.lock', + '.env', + ], + + /* + |-------------------------------------------------------------------------- + | Garbage Collection Threshold + |-------------------------------------------------------------------------- + | + | When executing long-lived PHP scripts such as Octane, memory can build + | up before being cleared by PHP. You can force Octane to run garbage + | collection if your application consumes this amount of megabytes. + | + */ + + 'garbage' => 50, + + /* + |-------------------------------------------------------------------------- + | Maximum Execution Time + |-------------------------------------------------------------------------- + | + | The following setting configures the maximum execution time for requests + | being handled by Octane. You may set this value to 0 to indicate that + | there isn't a specific time limit on Octane request execution time. + | + */ + + 'max_execution_time' => 30, + + 'swoole' => [ + 'options' => [ + 'log_file' => storage_path('logs/swoole_http.log'), + 'package_max_length' => 10 * 1024 * 1024, + ], + ], + +]; diff --git a/modules_statuses.json b/modules_statuses.json new file mode 100644 index 0000000..b25022e --- /dev/null +++ b/modules_statuses.json @@ -0,0 +1,4 @@ +{ + "CetakLabel": true, + "Hcis": true +} \ No newline at end of file diff --git a/routes/api.php b/routes/api.php index 97b255b..3f15ae4 100644 --- a/routes/api.php +++ b/routes/api.php @@ -1,5 +1,6 @@ get('/user', function (Request $request) { return $request->user(); }); - -Route::get('directorat',[DirectoratController::class, 'index']); diff --git a/routes/web.php b/routes/web.php index fe5ab33..b669080 100644 --- a/routes/web.php +++ b/routes/web.php @@ -1,7 +1,6 @@ ['auth', 'verified']], function () { }); - Route::resource('directorat', DirectoratController::class); Route::resource('sub-directorat', SubDirectoratController::class); Route::resource('job', JobController::class); Route::resource('sub-job', SubJobController::class); diff --git a/stubs/nwidart-stubs/assets/js/app.stub b/stubs/nwidart-stubs/assets/js/app.stub new file mode 100644 index 0000000..e69de29 diff --git a/stubs/nwidart-stubs/assets/sass/app.stub b/stubs/nwidart-stubs/assets/sass/app.stub new file mode 100644 index 0000000..e69de29 diff --git a/stubs/nwidart-stubs/command.stub b/stubs/nwidart-stubs/command.stub new file mode 100644 index 0000000..87469de --- /dev/null +++ b/stubs/nwidart-stubs/command.stub @@ -0,0 +1,68 @@ + + + diff --git a/stubs/nwidart-stubs/composer.stub b/stubs/nwidart-stubs/composer.stub new file mode 100644 index 0000000..8615cda --- /dev/null +++ b/stubs/nwidart-stubs/composer.stub @@ -0,0 +1,23 @@ +{ + "name": "$VENDOR$/$LOWER_NAME$", + "description": "", + "authors": [ + { + "name": "$AUTHOR_NAME$", + "email": "$AUTHOR_EMAIL$" + } + ], + "extra": { + "laravel": { + "providers": [], + "aliases": { + + } + } + }, + "autoload": { + "psr-4": { + "$MODULE_NAMESPACE$\\$STUDLY_NAME$\\": "" + } + } +} diff --git a/stubs/nwidart-stubs/controller-api.stub b/stubs/nwidart-stubs/controller-api.stub new file mode 100644 index 0000000..8cdac7c --- /dev/null +++ b/stubs/nwidart-stubs/controller-api.stub @@ -0,0 +1,60 @@ +get('/'); + + $response->assertStatus(200); + } +} diff --git a/stubs/nwidart-stubs/job-queued.stub b/stubs/nwidart-stubs/job-queued.stub new file mode 100644 index 0000000..5bcccf1 --- /dev/null +++ b/stubs/nwidart-stubs/job-queued.stub @@ -0,0 +1,34 @@ +view('view.name'); + } +} diff --git a/stubs/nwidart-stubs/middleware.stub b/stubs/nwidart-stubs/middleware.stub new file mode 100644 index 0000000..954583e --- /dev/null +++ b/stubs/nwidart-stubs/middleware.stub @@ -0,0 +1,21 @@ +id(); +$FIELDS$ + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('$TABLE$'); + } +}; diff --git a/stubs/nwidart-stubs/migration/delete.stub b/stubs/nwidart-stubs/migration/delete.stub new file mode 100644 index 0000000..4d1e064 --- /dev/null +++ b/stubs/nwidart-stubs/migration/delete.stub @@ -0,0 +1,32 @@ +bigIncrements('id'); +$FIELDS$ + $table->timestamps(); + }); + } +}; diff --git a/stubs/nwidart-stubs/migration/plain.stub b/stubs/nwidart-stubs/migration/plain.stub new file mode 100644 index 0000000..e46b052 --- /dev/null +++ b/stubs/nwidart-stubs/migration/plain.stub @@ -0,0 +1,28 @@ +line('The introduction to the notification.') + ->action('Notification Action', 'https://laravel.com') + ->line('Thank you for using our application!'); + } + + /** + * Get the array representation of the notification. + * + * @param mixed $notifiable + * @return array + */ + public function toArray($notifiable) + { + return [ + // + ]; + } +} diff --git a/stubs/nwidart-stubs/package.stub b/stubs/nwidart-stubs/package.stub new file mode 100644 index 0000000..30c1a80 --- /dev/null +++ b/stubs/nwidart-stubs/package.stub @@ -0,0 +1,16 @@ +{ + "private": true, + "scripts": { + "dev": "vite", + "build": "vite build" + }, + "devDependencies": { + "axios": "^0.21.4", + "dotenv": "^10.0.0", + "dotenv-expand": "^5.1.0", + "laravel-vite-plugin": "^0.6.0", + "lodash": "^4.17.21", + "postcss": "^8.3.7", + "vite": "^3.0.9" + } +} diff --git a/stubs/nwidart-stubs/policy.plain.stub b/stubs/nwidart-stubs/policy.plain.stub new file mode 100644 index 0000000..02e16df --- /dev/null +++ b/stubs/nwidart-stubs/policy.plain.stub @@ -0,0 +1,20 @@ +mapApiRoutes(); + + $this->mapWebRoutes(); + } + + /** + * Define the "web" routes for the application. + * + * These routes all receive session state, CSRF protection, etc. + * + * @return void + */ + protected function mapWebRoutes() + { + Route::middleware('web') + ->namespace($this->moduleNamespace) + ->group(module_path('$MODULE$', '$WEB_ROUTES_PATH$')); + } + + /** + * Define the "api" routes for the application. + * + * These routes are typically stateless. + * + * @return void + */ + protected function mapApiRoutes() + { + Route::prefix('api') + ->middleware('api') + ->namespace($this->moduleNamespace) + ->group(module_path('$MODULE$', '$API_ROUTES_PATH$')); + } +} diff --git a/stubs/nwidart-stubs/routes/api.stub b/stubs/nwidart-stubs/routes/api.stub new file mode 100644 index 0000000..78681d7 --- /dev/null +++ b/stubs/nwidart-stubs/routes/api.stub @@ -0,0 +1,18 @@ +get('/$LOWER_NAME$', function (Request $request) { + return $request->user(); +}); \ No newline at end of file diff --git a/stubs/nwidart-stubs/routes/web.stub b/stubs/nwidart-stubs/routes/web.stub new file mode 100644 index 0000000..ab7e7f7 --- /dev/null +++ b/stubs/nwidart-stubs/routes/web.stub @@ -0,0 +1,16 @@ +group(function() { + Route::get('/', '$STUDLY_NAME$Controller@index'); +}); diff --git a/stubs/nwidart-stubs/rule.stub b/stubs/nwidart-stubs/rule.stub new file mode 100644 index 0000000..9b71632 --- /dev/null +++ b/stubs/nwidart-stubs/rule.stub @@ -0,0 +1,40 @@ + '$STUDLY_NAME$' +]; diff --git a/stubs/nwidart-stubs/scaffold/provider.stub b/stubs/nwidart-stubs/scaffold/provider.stub new file mode 100644 index 0000000..d418e9f --- /dev/null +++ b/stubs/nwidart-stubs/scaffold/provider.stub @@ -0,0 +1,114 @@ +registerTranslations(); + $this->registerConfig(); + $this->registerViews(); + $this->loadMigrationsFrom(module_path($this->moduleName, '$MIGRATIONS_PATH$')); + } + + /** + * Register the service provider. + * + * @return void + */ + public function register() + { + $this->app->register(RouteServiceProvider::class); + } + + /** + * Register config. + * + * @return void + */ + protected function registerConfig() + { + $this->publishes([ + module_path($this->moduleName, '$PATH_CONFIG$/config.php') => config_path($this->moduleNameLower . '.php'), + ], 'config'); + $this->mergeConfigFrom( + module_path($this->moduleName, '$PATH_CONFIG$/config.php'), $this->moduleNameLower + ); + } + + /** + * Register views. + * + * @return void + */ + public function registerViews() + { + $viewPath = resource_path('views/modules/' . $this->moduleNameLower); + + $sourcePath = module_path($this->moduleName, '$PATH_VIEWS$'); + + $this->publishes([ + $sourcePath => $viewPath + ], ['views', $this->moduleNameLower . '-module-views']); + + $this->loadViewsFrom(array_merge($this->getPublishableViewPaths(), [$sourcePath]), $this->moduleNameLower); + } + + /** + * Register translations. + * + * @return void + */ + public function registerTranslations() + { + $langPath = resource_path('lang/modules/' . $this->moduleNameLower); + + if (is_dir($langPath)) { + $this->loadTranslationsFrom($langPath, $this->moduleNameLower); + $this->loadJsonTranslationsFrom($langPath); + } else { + $this->loadTranslationsFrom(module_path($this->moduleName, '$PATH_LANG$'), $this->moduleNameLower); + $this->loadJsonTranslationsFrom(module_path($this->moduleName, '$PATH_LANG$')); + } + } + + /** + * Get the services provided by the provider. + * + * @return array + */ + public function provides() + { + return []; + } + + private function getPublishableViewPaths(): array + { + $paths = []; + foreach (\Config::get('view.paths') as $path) { + if (is_dir($path . '/modules/' . $this->moduleNameLower)) { + $paths[] = $path . '/modules/' . $this->moduleNameLower; + } + } + return $paths; + } +} diff --git a/stubs/nwidart-stubs/seeder.stub b/stubs/nwidart-stubs/seeder.stub new file mode 100644 index 0000000..f35057d --- /dev/null +++ b/stubs/nwidart-stubs/seeder.stub @@ -0,0 +1,21 @@ +call("OthersTableSeeder"); + } +} diff --git a/stubs/nwidart-stubs/unit-test.stub b/stubs/nwidart-stubs/unit-test.stub new file mode 100644 index 0000000..be0bd55 --- /dev/null +++ b/stubs/nwidart-stubs/unit-test.stub @@ -0,0 +1,20 @@ +assertTrue(true); + } +} diff --git a/stubs/nwidart-stubs/views/index.stub b/stubs/nwidart-stubs/views/index.stub new file mode 100644 index 0000000..04b9288 --- /dev/null +++ b/stubs/nwidart-stubs/views/index.stub @@ -0,0 +1,9 @@ +@extends('$LOWER_NAME$::layouts.master') + +@section('content') +

Hello World

+ +

+ This view is loaded from module: {!! config('$LOWER_NAME$.name') !!} +

+@endsection diff --git a/stubs/nwidart-stubs/views/master.stub b/stubs/nwidart-stubs/views/master.stub new file mode 100644 index 0000000..89d8b76 --- /dev/null +++ b/stubs/nwidart-stubs/views/master.stub @@ -0,0 +1,19 @@ + + + + + + + Module $STUDLY_NAME$ + + {{-- Laravel Vite - CSS File --}} + {{-- {{ module_vite('build-$LOWER_NAME$', 'Resources/assets/sass/app.scss') }} --}} + + + + @yield('content') + + {{-- Laravel Vite - JS File --}} + {{-- {{ module_vite('build-$LOWER_NAME$', 'Resources/assets/js/app.js') }} --}} + + diff --git a/stubs/nwidart-stubs/vite.stub b/stubs/nwidart-stubs/vite.stub new file mode 100644 index 0000000..4bc21f8 --- /dev/null +++ b/stubs/nwidart-stubs/vite.stub @@ -0,0 +1,24 @@ +const dotenvExpand = require('dotenv-expand'); +dotenvExpand(require('dotenv').config({ path: '../../.env'/*, debug: true*/})); + +import { defineConfig } from 'vite'; +import laravel from 'laravel-vite-plugin'; + +export default defineConfig({ + build: { + outDir: '../../public/build-$LOWER_NAME$', + emptyOutDir: true, + manifest: true, + }, + plugins: [ + laravel({ + publicDirectory: '../../public', + buildDirectory: 'build-$LOWER_NAME$', + input: [ + __dirname + '/Resources/assets/sass/app.scss', + __dirname + '/Resources/assets/js/app.js' + ], + refresh: true, + }), + ], +});