pull/3/head
Rustem 2025-01-01 20:42:04 +05:00
parent bd3c3ad01e
commit 94d703dca6
13 changed files with 107 additions and 29 deletions

View File

@ -23,6 +23,7 @@ class PipiCarInstallCommands extends InstallCommand
// Upgrade::Roles(); // Upgrade::Roles();
$this->packages = [ $this->packages = [
'main', // Главная страница
'auto_brands', // Бренд авто 'auto_brands', // Бренд авто
'auto_colors', // Цвета авто 'auto_colors', // Цвета авто
'auto_types', // Типы авто 'auto_types', // Типы авто

View File

@ -24,6 +24,7 @@ class AppServiceProvider extends ServiceProvider
*/ */
public function boot() public function boot()
{ {
view()->addNamespace('pipicar', base_path('modules'));
if (env('APP_ENV') === 'production') { if (env('APP_ENV') === 'production') {
\Illuminate\Support\Facades\URL::forceScheme('https'); \Illuminate\Support\Facades\URL::forceScheme('https');
} }

View File

@ -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 | 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 | Once Artisan has finished running, we will fire off the shutdown events

View File

@ -2,7 +2,7 @@
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Create The Application | Create The Applications
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| The first thing we will do is create a new Laravel application instance | 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 | This script returns the application instance. The instance is given to

View File

@ -7,7 +7,7 @@ return [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Application Name | Applications Name
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| This value is the name of your application. This value is used when the | 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 | 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 | 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 | 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 | 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 | 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 | 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\AppServiceProvider::class,
App\Providers\AuthServiceProvider::class, App\Providers\AuthServiceProvider::class,

View File

@ -2,23 +2,23 @@
use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Route;
Route::get("/login", [modules\Auth\Http\Controllers\LoginController::class,'showLoginForm'])->name('loginForm'); Route::get("/login", [App\Modules\Auth\Http\Controllers\LoginController::class,'showLoginForm'])->name('loginForm');
Route::post("/login", [modules\Auth\Http\Controllers\LoginController::class,'login'])->name('login'); 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::get('/register',[App\Modules\Auth\Http\Controllers\RegisterController::class,'showRegistrationForm'])->name('registerForm');
Route::post('/register',[modules\Auth\Http\Controllers\RegisterController::class,'register'])->name('register'); 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::get('/password/reset', [App\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::post('/password/email',[App\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::get('/password/reset/{token}',[App\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::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::get('password/confirm',[App\Modules\Auth\Http\Controllers\ConfirmPasswordController::class,'showConfirmForm'])->name('password.confirm');
Route::post('password/confirm',[modules\Auth\Http\Controllers\ConfirmPasswordController::class,'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',[App\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::get('email/verify/{id}/{hash}',[App\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::post('email/resend',[App\Modules\Auth\Http\Controllers\VerificationController::class,'resend'])->name('verification.resend');

View File

@ -22,7 +22,7 @@ class Home extends BaseApplication
public function default() public function default()
{ {
if(Auth::check()){ if(Auth::check()){
return redirect(lurl('/')); return redirect(lurl('app/main'));
} else { } else {
return redirect(lurl('login')); return redirect(lurl('login'));
} }

View File

@ -0,0 +1,27 @@
<?php
/*
* Copyright (c) 2023.
*
* Aidyn Sapargaliyev
* ТОО Дизайн лаборатория А7
*
*/
namespace App\Modules\main\Applications;
use A7kz\Base\Application;
/**
* @property $module
* @property $title
* @method getLink()
*/
class Main extends Application
{
/**
* @throws \Exception
*/
public function run($action){
return component('App.Modules.main.Components.Main', ['app'=>$this], $this->module);
}
}

View File

@ -0,0 +1,21 @@
<?php
/*
* Copyright (c) 2023.
*
* Aidyn Sapargaliyev
* ТОО Дизайн лаборатория А7
*
*/
namespace App\Modules\main\Components;
use A7kz\Platform\Modules\Platform\Core\Services\Base\Component;
class Main extends Component
{
public function __construct(array $params = [], $module = 'Platform.Core')
{
parent::__construct($params, $module);
$this->template = 'pipicar::main.views.main';
}
}

16
modules/main/access.json Normal file
View File

@ -0,0 +1,16 @@
{
"admin": [
"default",
"add",
"show",
"edit",
"delete"
],
"director": [
"default",
"add",
"show",
"edit",
"delete"
]
}

8
modules/main/app.json Normal file
View File

@ -0,0 +1,8 @@
{
"module": "pipicar",
"name": "main",
"title": "Избранное",
"description": "'Учет.Главная'",
"type": "custom",
"class": "App.Modules.main.Applications.Main"
}

View File

@ -0,0 +1,4 @@
@extends('layouts.app')
@section('content')
@endsection

View File

@ -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 | 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 | Once we have the application, we can handle the incoming request using