diff --git a/app/Console/PipiCarInstallCommands.php b/app/Console/PipiCarInstallCommands.php index ae19247..9640732 100644 --- a/app/Console/PipiCarInstallCommands.php +++ b/app/Console/PipiCarInstallCommands.php @@ -23,6 +23,7 @@ class PipiCarInstallCommands extends InstallCommand // Upgrade::Roles(); $this->packages = [ + 'main', // Главная страница 'auto_brands', // Бренд авто 'auto_colors', // Цвета авто 'auto_types', // Типы авто diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index de20106..743e670 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -24,6 +24,7 @@ class AppServiceProvider extends ServiceProvider */ public function boot() { + view()->addNamespace('pipicar', base_path('modules')); if (env('APP_ENV') === 'production') { \Illuminate\Support\Facades\URL::forceScheme('https'); } diff --git a/artisan b/artisan index 67a3329..e759cb1 100755 --- a/artisan +++ b/artisan @@ -21,7 +21,7 @@ $app = require_once __DIR__.'/bootstrap/app.php'; /* |-------------------------------------------------------------------------- -| Run The Artisan Application +| Run The Artisan Applications |-------------------------------------------------------------------------- | | When we run the console application, the current CLI command will be @@ -39,7 +39,7 @@ $status = $kernel->handle( /* |-------------------------------------------------------------------------- -| Shutdown The Application +| Shutdown The Applications |-------------------------------------------------------------------------- | | Once Artisan has finished running, we will fire off the shutdown events diff --git a/bootstrap/app.php b/bootstrap/app.php index 037e17d..09cc097 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -2,7 +2,7 @@ /* |-------------------------------------------------------------------------- -| Create The Application +| Create The Applications |-------------------------------------------------------------------------- | | The first thing we will do is create a new Laravel application instance @@ -43,7 +43,7 @@ $app->singleton( /* |-------------------------------------------------------------------------- -| Return The Application +| Return The Applications |-------------------------------------------------------------------------- | | This script returns the application instance. The instance is given to diff --git a/config/app.php b/config/app.php index be94455..d5260af 100644 --- a/config/app.php +++ b/config/app.php @@ -7,7 +7,7 @@ return [ /* |-------------------------------------------------------------------------- - | Application Name + | Applications Name |-------------------------------------------------------------------------- | | This value is the name of your application. This value is used when the @@ -20,7 +20,7 @@ return [ /* |-------------------------------------------------------------------------- - | Application Environment + | Applications Environment |-------------------------------------------------------------------------- | | This value determines the "environment" your application is currently @@ -33,7 +33,7 @@ return [ /* |-------------------------------------------------------------------------- - | Application Debug Mode + | Applications Debug Mode |-------------------------------------------------------------------------- | | When your application is in debug mode, detailed error messages with @@ -46,7 +46,7 @@ return [ /* |-------------------------------------------------------------------------- - | Application URL + | Applications URL |-------------------------------------------------------------------------- | | This URL is used by the console to properly generate URLs when using @@ -61,7 +61,7 @@ return [ /* |-------------------------------------------------------------------------- - | Application Timezone + | Applications Timezone |-------------------------------------------------------------------------- | | Here you may specify the default timezone for your application, which @@ -74,7 +74,7 @@ return [ /* |-------------------------------------------------------------------------- - | Application Locale Configuration + | Applications Locale Configuration |-------------------------------------------------------------------------- | | The application locale determines the default locale that will be used @@ -87,7 +87,7 @@ return [ /* |-------------------------------------------------------------------------- - | Application Fallback Locale + | Applications Fallback Locale |-------------------------------------------------------------------------- | | The fallback locale determines the locale to use when the current one @@ -161,7 +161,7 @@ return [ */ /* - * Application Service Providers... + * Applications Service Providers... */ App\Providers\AppServiceProvider::class, App\Providers\AuthServiceProvider::class, diff --git a/modules/Auth/routes/web.php b/modules/Auth/routes/web.php index 0bdc068..ec24181 100644 --- a/modules/Auth/routes/web.php +++ b/modules/Auth/routes/web.php @@ -2,23 +2,23 @@ use Illuminate\Support\Facades\Route; -Route::get("/login", [modules\Auth\Http\Controllers\LoginController::class,'showLoginForm'])->name('loginForm'); -Route::post("/login", [modules\Auth\Http\Controllers\LoginController::class,'login'])->name('login'); +Route::get("/login", [App\Modules\Auth\Http\Controllers\LoginController::class,'showLoginForm'])->name('loginForm'); +Route::post("/login", [App\Modules\Auth\Http\Controllers\LoginController::class,'login'])->name('login'); -Route::any("/logout", [modules\Auth\Http\Controllers\LoginController::class,'logout'])->name("logout"); +Route::any("/logout", [App\Modules\Auth\Http\Controllers\LoginController::class,'logout'])->name("logout"); -Route::get('/register',[modules\Auth\Http\Controllers\RegisterController::class,'showRegistrationForm'])->name('registerForm'); -Route::post('/register',[modules\Auth\Http\Controllers\RegisterController::class,'register'])->name('register'); +Route::get('/register',[App\Modules\Auth\Http\Controllers\RegisterController::class,'showRegistrationForm'])->name('registerForm'); +Route::post('/register',[App\Modules\Auth\Http\Controllers\RegisterController::class,'register'])->name('register'); -Route::get('/password/reset', [modules\Auth\Http\Controllers\ForgotPasswordController::class,'showLinkRequestForm'])->name('password.request'); -Route::post('/password/email',[modules\Auth\Http\Controllers\ForgotPasswordController::class,'sendResetLinkEmail'])->name('password.email'); -Route::get('/password/reset/{token}',[modules\Auth\Http\Controllers\ResetPasswordController::class,'showResetForm'])->name('password.reset'); -Route::post('/password/reset',[modules\Auth\Http\Controllers\ResetPasswordController::class,'reset'])->name('password.update'); +Route::get('/password/reset', [App\Modules\Auth\Http\Controllers\ForgotPasswordController::class,'showLinkRequestForm'])->name('password.request'); +Route::post('/password/email',[App\Modules\Auth\Http\Controllers\ForgotPasswordController::class,'sendResetLinkEmail'])->name('password.email'); +Route::get('/password/reset/{token}',[App\Modules\Auth\Http\Controllers\ResetPasswordController::class,'showResetForm'])->name('password.reset'); +Route::post('/password/reset',[App\Modules\Auth\Http\Controllers\ResetPasswordController::class,'reset'])->name('password.update'); -Route::get('password/confirm',[modules\Auth\Http\Controllers\ConfirmPasswordController::class,'showConfirmForm'])->name('password.confirm'); -Route::post('password/confirm',[modules\Auth\Http\Controllers\ConfirmPasswordController::class,'confirm']); +Route::get('password/confirm',[App\Modules\Auth\Http\Controllers\ConfirmPasswordController::class,'showConfirmForm'])->name('password.confirm'); +Route::post('password/confirm',[App\Modules\Auth\Http\Controllers\ConfirmPasswordController::class,'confirm']); -Route::get('email/verify',[modules\Auth\Http\Controllers\VerificationController::class,'show'])->name('verification.notice'); -Route::get('email/verify/{id}/{hash}',[modules\Auth\Http\Controllers\VerificationController::class,'verify'])->name('verification.verify'); -Route::post('email/resend',[modules\Auth\Http\Controllers\VerificationController::class,'resend'])->name('verification.resend'); +Route::get('email/verify',[App\Modules\Auth\Http\Controllers\VerificationController::class,'show'])->name('verification.notice'); +Route::get('email/verify/{id}/{hash}',[App\Modules\Auth\Http\Controllers\VerificationController::class,'verify'])->name('verification.verify'); +Route::post('email/resend',[App\Modules\Auth\Http\Controllers\VerificationController::class,'resend'])->name('verification.resend'); diff --git a/modules/Home/Applications/Home.php b/modules/Home/Applications/Home.php index 259118a..a7dc06c 100644 --- a/modules/Home/Applications/Home.php +++ b/modules/Home/Applications/Home.php @@ -22,7 +22,7 @@ class Home extends BaseApplication public function default() { if(Auth::check()){ - return redirect(lurl('/')); + return redirect(lurl('app/main')); } else { return redirect(lurl('login')); } diff --git a/modules/main/Applications/Main.php b/modules/main/Applications/Main.php new file mode 100644 index 0000000..0058293 --- /dev/null +++ b/modules/main/Applications/Main.php @@ -0,0 +1,27 @@ +$this], $this->module); + } +} diff --git a/modules/main/Components/Main.php b/modules/main/Components/Main.php new file mode 100644 index 0000000..c66a578 --- /dev/null +++ b/modules/main/Components/Main.php @@ -0,0 +1,21 @@ +template = 'pipicar::main.views.main'; + } +} diff --git a/modules/main/access.json b/modules/main/access.json new file mode 100644 index 0000000..0d87c5b --- /dev/null +++ b/modules/main/access.json @@ -0,0 +1,16 @@ +{ + "admin": [ + "default", + "add", + "show", + "edit", + "delete" + ], + "director": [ + "default", + "add", + "show", + "edit", + "delete" + ] +} \ No newline at end of file diff --git a/modules/main/app.json b/modules/main/app.json new file mode 100644 index 0000000..92772e4 --- /dev/null +++ b/modules/main/app.json @@ -0,0 +1,8 @@ +{ + "module": "pipicar", + "name": "main", + "title": "Избранное", + "description": "'Учет.Главная'", + "type": "custom", + "class": "App.Modules.main.Applications.Main" +} diff --git a/modules/main/views/main.blade.php b/modules/main/views/main.blade.php new file mode 100644 index 0000000..fba286c --- /dev/null +++ b/modules/main/views/main.blade.php @@ -0,0 +1,4 @@ +@extends('layouts.app') + +@section('content') +@endsection diff --git a/public/index.php b/public/index.php index 1d69f3a..dd17925 100644 --- a/public/index.php +++ b/public/index.php @@ -7,7 +7,7 @@ define('LARAVEL_START', microtime(true)); /* |-------------------------------------------------------------------------- -| Check If The Application Is Under Maintenance +| Check If The Applications Is Under Maintenance |-------------------------------------------------------------------------- | | If the application is in maintenance / demo mode via the "down" command @@ -35,7 +35,7 @@ require __DIR__.'/../vendor/autoload.php'; /* |-------------------------------------------------------------------------- -| Run The Application +| Run The Applications |-------------------------------------------------------------------------- | | Once we have the application, we can handle the incoming request using