Committing laravel + api (part 1)
committing part of the laravel system with templating files and api implementation.
This commit is contained in:
parent
8a327c5b95
commit
b91cf0cbde
103 changed files with 17339 additions and 0 deletions
27
app/Console/Kernel.php
Normal file
27
app/Console/Kernel.php
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
namespace App\Console;
|
||||
|
||||
use Illuminate\Console\Scheduling\Schedule;
|
||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||
|
||||
class Kernel extends ConsoleKernel
|
||||
{
|
||||
/**
|
||||
* Define the application's command schedule.
|
||||
*/
|
||||
protected function schedule(Schedule $schedule): void
|
||||
{
|
||||
// $schedule->command('inspire')->hourly();
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the commands for the application.
|
||||
*/
|
||||
protected function commands(): void
|
||||
{
|
||||
$this->load(__DIR__.'/Commands');
|
||||
|
||||
require base_path('routes/console.php');
|
||||
}
|
||||
}
|
30
app/Exceptions/Handler.php
Normal file
30
app/Exceptions/Handler.php
Normal file
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||
use Throwable;
|
||||
|
||||
class Handler extends ExceptionHandler
|
||||
{
|
||||
/**
|
||||
* The list of the inputs that are never flashed to the session on validation exceptions.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $dontFlash = [
|
||||
'current_password',
|
||||
'password',
|
||||
'password_confirmation',
|
||||
];
|
||||
|
||||
/**
|
||||
* Register the exception handling callbacks for the application.
|
||||
*/
|
||||
public function register(): void
|
||||
{
|
||||
$this->reportable(function (Throwable $e) {
|
||||
//
|
||||
});
|
||||
}
|
||||
}
|
45
app/Http/Controllers/AuthController.php
Normal file
45
app/Http/Controllers/AuthController.php
Normal file
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\View\View;
|
||||
use App\Http\Requests\LoginRequest;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class AuthController extends Controller
|
||||
{
|
||||
/**
|
||||
* Show specified view.
|
||||
*/
|
||||
public function loginView(): View
|
||||
{
|
||||
return view('login.main', [
|
||||
'layout' => 'base'
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Authenticate login user.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
*/
|
||||
public function login(LoginRequest $request): void
|
||||
{
|
||||
if (!Auth::attempt([
|
||||
'email' => $request->email,
|
||||
'password' => $request->password
|
||||
])) {
|
||||
throw new \Exception('Wrong email or password.');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Logout user.
|
||||
*/
|
||||
public function logout(): RedirectResponse
|
||||
{
|
||||
Auth::logout();
|
||||
return redirect('login');
|
||||
}
|
||||
}
|
10
app/Http/Controllers/CategoryController.php
Normal file
10
app/Http/Controllers/CategoryController.php
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class CategoryController extends Controller
|
||||
{
|
||||
//
|
||||
}
|
23
app/Http/Controllers/ColorSchemeController.php
Normal file
23
app/Http/Controllers/ColorSchemeController.php
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
|
||||
class ColorSchemeController extends Controller
|
||||
{
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
*/
|
||||
public function switch(Request $request): RedirectResponse
|
||||
{
|
||||
session([
|
||||
'color_scheme' => $request->color_scheme
|
||||
]);
|
||||
|
||||
return back();
|
||||
}
|
||||
}
|
12
app/Http/Controllers/Controller.php
Normal file
12
app/Http/Controllers/Controller.php
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
||||
use Illuminate\Foundation\Validation\ValidatesRequests;
|
||||
use Illuminate\Routing\Controller as BaseController;
|
||||
|
||||
class Controller extends BaseController
|
||||
{
|
||||
use AuthorizesRequests, ValidatesRequests;
|
||||
}
|
21
app/Http/Controllers/DarkModeController.php
Normal file
21
app/Http/Controllers/DarkModeController.php
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
|
||||
class DarkModeController extends Controller
|
||||
{
|
||||
/**
|
||||
* Switch dark/light mode.
|
||||
*
|
||||
*/
|
||||
public function switch(): RedirectResponse
|
||||
{
|
||||
session([
|
||||
'dark_mode' => session()->has('dark_mode') ? !session()->get('dark_mode') : true
|
||||
]);
|
||||
|
||||
return back();
|
||||
}
|
||||
}
|
10
app/Http/Controllers/FeedbackController.php
Normal file
10
app/Http/Controllers/FeedbackController.php
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class FeedbackController extends Controller
|
||||
{
|
||||
//
|
||||
}
|
671
app/Http/Controllers/PageController.php
Normal file
671
app/Http/Controllers/PageController.php
Normal file
|
@ -0,0 +1,671 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\View\View;
|
||||
|
||||
class PageController extends Controller
|
||||
{
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function dashboardOverview1(): View
|
||||
{
|
||||
return view('pages/dashboard-overview-1', [
|
||||
// Specify the base layout.
|
||||
// Eg: 'side-menu', 'simple-menu', 'top-menu', 'login'
|
||||
// The default value is 'side-menu'
|
||||
|
||||
// 'layout' => 'side-menu'
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function dashboardOverview2(): View
|
||||
{
|
||||
return view('pages/dashboard-overview-2');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function dashboardOverview3(): View
|
||||
{
|
||||
return view('pages/dashboard-overview-3');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function dashboardOverview4(): View
|
||||
{
|
||||
return view('pages/dashboard-overview-4');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function inbox(): View
|
||||
{
|
||||
return view('pages/inbox');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function categories(): View
|
||||
{
|
||||
return view('pages/categories');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function addProduct(): View
|
||||
{
|
||||
return view('pages/add-product');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function productList(): View
|
||||
{
|
||||
return view('pages/product-list');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function productGrid(): View
|
||||
{
|
||||
return view('pages/product-grid');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function transactionList(): View
|
||||
{
|
||||
return view('pages/transaction-list');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function transactionDetail(): View
|
||||
{
|
||||
return view('pages/transaction-detail');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function sellerList(): View
|
||||
{
|
||||
return view('pages/seller-list');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function sellerDetail(): View
|
||||
{
|
||||
return view('pages/seller-detail');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function reviews(): View
|
||||
{
|
||||
return view('pages/reviews');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function fileManager(): View
|
||||
{
|
||||
return view('pages/file-manager');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function pointOfSale(): View
|
||||
{
|
||||
return view('pages/point-of-sale');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function chat(): View
|
||||
{
|
||||
return view('pages/chat');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function post(): View
|
||||
{
|
||||
return view('pages/post');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function calendar(): View
|
||||
{
|
||||
return view('pages/calendar');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function crudDataList(): View
|
||||
{
|
||||
return view('pages/crud-data-list');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function crudForm(): View
|
||||
{
|
||||
return view('pages/crud-form');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function usersLayout1(): View
|
||||
{
|
||||
return view('pages/users-layout-1');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function usersLayout2(): View
|
||||
{
|
||||
return view('pages/users-layout-2');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function usersLayout3(): View
|
||||
{
|
||||
return view('pages/users-layout-3');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function profileOverview1(): View
|
||||
{
|
||||
return view('pages/profile-overview-1');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function profileOverview2(): View
|
||||
{
|
||||
return view('pages/profile-overview-2');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function profileOverview3(): View
|
||||
{
|
||||
return view('pages/profile-overview-3');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function wizardLayout1(): View
|
||||
{
|
||||
return view('pages/wizard-layout-1');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function wizardLayout2(): View
|
||||
{
|
||||
return view('pages/wizard-layout-2');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function wizardLayout3(): View
|
||||
{
|
||||
return view('pages/wizard-layout-3');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function blogLayout1(): View
|
||||
{
|
||||
return view('pages/blog-layout-1');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function blogLayout2(): View
|
||||
{
|
||||
return view('pages/blog-layout-2');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function blogLayout3(): View
|
||||
{
|
||||
return view('pages/blog-layout-3');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function pricingLayout1(): View
|
||||
{
|
||||
return view('pages/pricing-layout-1');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function pricingLayout2(): View
|
||||
{
|
||||
return view('pages/pricing-layout-2');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function invoiceLayout1(): View
|
||||
{
|
||||
return view('pages/invoice-layout-1');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function invoiceLayout2(): View
|
||||
{
|
||||
return view('pages/invoice-layout-2');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function faqLayout1(): View
|
||||
{
|
||||
return view('pages/faq-layout-1');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function faqLayout2(): View
|
||||
{
|
||||
return view('pages/faq-layout-2');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function faqLayout3(): View
|
||||
{
|
||||
return view('pages/faq-layout-3');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function login(): View
|
||||
{
|
||||
return view('pages/login');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function register(): View
|
||||
{
|
||||
return view('pages/register');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function errorPage(): View
|
||||
{
|
||||
return view('pages/error-page');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function updateProfile(): View
|
||||
{
|
||||
return view('pages/update-profile');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function changePassword(): View
|
||||
{
|
||||
return view('pages/change-password');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function regularTable(): View
|
||||
{
|
||||
return view('pages/regular-table');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function tabulator(): View
|
||||
{
|
||||
return view('pages/tabulator');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function modal(): View
|
||||
{
|
||||
return view('pages/modal');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function slideOver(): View
|
||||
{
|
||||
return view('pages/slide-over');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function notification(): View
|
||||
{
|
||||
return view('pages/notification');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function tab(): View
|
||||
{
|
||||
return view('pages/tab');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function accordion(): View
|
||||
{
|
||||
return view('pages/accordion');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function button(): View
|
||||
{
|
||||
return view('pages/button');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function alert(): View
|
||||
{
|
||||
return view('pages/alert');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function progressBar(): View
|
||||
{
|
||||
return view('pages/progress-bar');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function tooltip(): View
|
||||
{
|
||||
return view('pages/tooltip');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function dropdown(): View
|
||||
{
|
||||
return view('pages/dropdown');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function typography(): View
|
||||
{
|
||||
return view('pages/typography');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function icon(): View
|
||||
{
|
||||
return view('pages/icon');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function loadingIcon(): View
|
||||
{
|
||||
return view('pages/loading-icon');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function regularForm(): View
|
||||
{
|
||||
return view('pages/regular-form');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function datepicker(): View
|
||||
{
|
||||
return view('pages/datepicker');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function tomSelect(): View
|
||||
{
|
||||
return view('pages/tom-select');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function fileUpload(): View
|
||||
{
|
||||
return view('pages/file-upload');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function wysiwygEditorClassic(): View
|
||||
{
|
||||
return view('pages/wysiwyg-editor-classic');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function wysiwygEditorInline(): View
|
||||
{
|
||||
return view('pages/wysiwyg-editor-inline');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function wysiwygEditorBalloon(): View
|
||||
{
|
||||
return view('pages/wysiwyg-editor-balloon');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function wysiwygEditorBalloonBlock(): View
|
||||
{
|
||||
return view('pages/wysiwyg-editor-balloon-block');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function wysiwygEditorDocument(): View
|
||||
{
|
||||
return view('pages/wysiwyg-editor-document');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function validation(): View
|
||||
{
|
||||
return view('pages/validation');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function chart(): View
|
||||
{
|
||||
return view('pages/chart');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function slider(): View
|
||||
{
|
||||
return view('pages/slider');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show specified view.
|
||||
*
|
||||
*/
|
||||
public function imageZoom(): View
|
||||
{
|
||||
return view('pages/image-zoom');
|
||||
}
|
||||
}
|
10
app/Http/Controllers/PictureController.php
Normal file
10
app/Http/Controllers/PictureController.php
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class PictureController extends Controller
|
||||
{
|
||||
//
|
||||
}
|
10
app/Http/Controllers/PlacemarkController.php
Normal file
10
app/Http/Controllers/PlacemarkController.php
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class PlacemarkController extends Controller
|
||||
{
|
||||
//
|
||||
}
|
249
app/Http/Controllers/RouteController.php
Normal file
249
app/Http/Controllers/RouteController.php
Normal file
|
@ -0,0 +1,249 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Category;
|
||||
use App\Models\Feedback;
|
||||
use App\Models\Placemark;
|
||||
use App\Models\Route;
|
||||
use App\Models\RouteSportDetails;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class RouteController extends Controller
|
||||
{
|
||||
// Return basic details for all routes
|
||||
public function getAllRoutes()
|
||||
{
|
||||
$routes = Route::with(['category', 'routeSportDetails.sport'])->get();
|
||||
|
||||
$result = [];
|
||||
foreach ($routes as $route) {
|
||||
$sportsDetails = $route->routeSportDetails;
|
||||
|
||||
$sportsData = [];
|
||||
foreach ($sportsDetails as $detail) {
|
||||
$sportsData[] = [
|
||||
'id' => $detail->sport_id,
|
||||
'name_it' => $detail->sport->name_it,
|
||||
'name_en' => $detail->sport->name_en,
|
||||
];
|
||||
}
|
||||
|
||||
$result[] = [
|
||||
'id' => $route->id,
|
||||
'title_it' => $route->name_it,
|
||||
'title_en' => $route->name_en,
|
||||
'description_it' => $route->description_it,
|
||||
'description_en' => $route->description_en,
|
||||
'length' => $sportsDetails->sum('distance'),
|
||||
'elevation_gain' => $sportsDetails->sum('elevation_gain'),
|
||||
'sports' => $sportsData,
|
||||
'category_id' => $route->category->id,
|
||||
'category_name_it' => $route->category->name_it,
|
||||
'category_name_en' => $route->category->name_en,
|
||||
];
|
||||
}
|
||||
|
||||
return response()->json($result);
|
||||
}
|
||||
|
||||
// Return all route categories
|
||||
public function getRoutesCategories()
|
||||
{
|
||||
$categories = Category::all();
|
||||
return response()->json($categories);
|
||||
}
|
||||
|
||||
// Return routes by category
|
||||
public function getRoutesByCategory($catId)
|
||||
{
|
||||
$routes = Route::with(['category', 'routeSportDetails.sport'])
|
||||
->where('route_category_id', $catId)
|
||||
->get();
|
||||
|
||||
$result = [];
|
||||
foreach ($routes as $route) {
|
||||
$sportsDetails = $route->routeSportDetails;
|
||||
|
||||
$sportsData = [];
|
||||
foreach ($sportsDetails as $detail) {
|
||||
$sportsData[] = [
|
||||
'id' => $detail->sport_id,
|
||||
'name_it' => $detail->sport->name_it,
|
||||
'name_en' => $detail->sport->name_en,
|
||||
];
|
||||
}
|
||||
|
||||
$result[] = [
|
||||
'id' => $route->id,
|
||||
'title_it' => $route->name_it,
|
||||
'title_en' => $route->name_en,
|
||||
'description_it' => $route->description_it,
|
||||
'description_en' => $route->description_en,
|
||||
'length' => $sportsDetails->sum('distance'),
|
||||
'elevation_gain' => $sportsDetails->sum('elevation_gain'),
|
||||
'sports' => $sportsData,
|
||||
];
|
||||
}
|
||||
|
||||
return response()->json($result);
|
||||
}
|
||||
|
||||
// Return all sport details for a single route, including pictures
|
||||
public function getSingleRoute($id)
|
||||
{
|
||||
$route = Route::where('id', $id)
|
||||
->with(['routeSportDetails.sport', 'pictures'])
|
||||
->first();
|
||||
|
||||
return response()->json($route);
|
||||
}
|
||||
|
||||
// Return route details for a single sport, including pictures
|
||||
public function getSingleRouteDetails($id, $sportId)
|
||||
{
|
||||
$route = Route::where('id', $id)
|
||||
->with(['routeSportDetails' => function($query) use ($sportId) {
|
||||
$query->where('sport_id', $sportId);
|
||||
}, 'pictures'])
|
||||
->first();
|
||||
|
||||
return response()->json($route);
|
||||
}
|
||||
|
||||
// Download the GPX file for a specific route and sport
|
||||
public function downloadGpx($id, $sportId)
|
||||
{
|
||||
$routeDetail = RouteSportDetails::where(['route_id' => $id, 'sport_id' => $sportId])
|
||||
->first();
|
||||
$file = storage_path("app/{$routeDetail->gpx_path}");
|
||||
|
||||
return response()->download($file);
|
||||
}
|
||||
|
||||
// Return placemarks for a specific sport and route
|
||||
public function getPlacemarks($id, $sportId)
|
||||
{
|
||||
$placemarks = Placemark::whereHas('routeSportDetailPlacemark', function($query) use ($id, $sportId) {
|
||||
$query->where(['route_id' => $id, 'sport_id' => $sportId]);
|
||||
})
|
||||
->get();
|
||||
|
||||
return response()->json($placemarks);
|
||||
}
|
||||
|
||||
// Get all feedbacks for a specific route and sport
|
||||
public function getFeedbacks($id, $sportId)
|
||||
{
|
||||
$feedbacks = Feedback::whereHas('routeFeedback', function($query) use ($id, $sportId) {
|
||||
$query->where(['route_id' => $id, 'sport_id' => $sportId]);
|
||||
})
|
||||
->get();
|
||||
|
||||
return response()->json($feedbacks);
|
||||
}
|
||||
|
||||
// Store feedback for a specific route and sport
|
||||
public function storeFeedback(Request $request)
|
||||
{
|
||||
$data = $request->validate([
|
||||
'title' => 'required|string|max:255',
|
||||
'body' => 'required|string',
|
||||
'rating' => 'required|integer',
|
||||
'user_nickname' => 'required|string|max:100',
|
||||
'route_id' => 'required|integer',
|
||||
'sport_id' => 'required|integer'
|
||||
]);
|
||||
|
||||
$feedback = new Feedback($data);
|
||||
$feedback->save();
|
||||
|
||||
return response()->json(['message' => 'Feedback stored successfully']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
public function getAllRoutes(Request $request)
|
||||
{
|
||||
// Get items from the database
|
||||
$items = [
|
||||
[
|
||||
'title1' => "titoli eprcorso 1",
|
||||
'title2' => "titoli eprcorso 2",
|
||||
'title3' => "titoli eprcorso 3",
|
||||
],
|
||||
];
|
||||
|
||||
// Return the items as JSON
|
||||
return response()->json($items);
|
||||
}
|
||||
|
||||
public function getSingleRoute(Request $request, $routeId)
|
||||
{
|
||||
// Validate the request
|
||||
if (!$routeId || $routeId == '')
|
||||
{
|
||||
return response()->json([
|
||||
'error' => 'Scegliere un percorso.',
|
||||
], 400);
|
||||
}
|
||||
|
||||
// Get the items from the database
|
||||
$items = [
|
||||
[
|
||||
'title' => "titolo eprcorso ".$routeId,
|
||||
],
|
||||
];
|
||||
|
||||
// Return the items as JSON
|
||||
return response()->json($items);
|
||||
}
|
||||
|
||||
|
||||
public function storeFeedback(Request $request, $routeId, $sportId)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function getRoutesCategories(Request $request)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function getRoutesByCategory(Request $request, $catId)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function getItem(Request $request, $routeId)
|
||||
{
|
||||
// Get the title and id from the request body
|
||||
$title = request()->input('title');
|
||||
$id = request()->input('id');
|
||||
|
||||
// Validate the request
|
||||
if (! $title || ! $id) {
|
||||
return response()->json([
|
||||
'error' => 'Invalid request.',
|
||||
], 400);
|
||||
}
|
||||
|
||||
// Get the items from the database
|
||||
$items = [
|
||||
[
|
||||
'title' => $title."_ext",
|
||||
'id' => $id."_ext",
|
||||
],
|
||||
];
|
||||
|
||||
// Return the items as JSON
|
||||
return response()->json($items);
|
||||
}
|
||||
*/
|
||||
}
|
10
app/Http/Controllers/RouteMapController.php
Normal file
10
app/Http/Controllers/RouteMapController.php
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class RouteMapController extends Controller
|
||||
{
|
||||
//
|
||||
}
|
10
app/Http/Controllers/RouteSportDetailsController.php
Normal file
10
app/Http/Controllers/RouteSportDetailsController.php
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class RouteSportDetailsController extends Controller
|
||||
{
|
||||
//
|
||||
}
|
10
app/Http/Controllers/SportController.php
Normal file
10
app/Http/Controllers/SportController.php
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class SportController extends Controller
|
||||
{
|
||||
//
|
||||
}
|
36
app/Http/Helpers.php
Normal file
36
app/Http/Helpers.php
Normal file
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
if (!function_exists('merge')) {
|
||||
function merge($arrays)
|
||||
{
|
||||
$result = [];
|
||||
|
||||
foreach ($arrays as $array) {
|
||||
if ($array !== null) {
|
||||
if (gettype($array) !== 'string') {
|
||||
foreach ($array as $key => $value) {
|
||||
if (is_integer($key)) {
|
||||
$result[] = $value;
|
||||
} elseif (isset($result[$key]) && is_array($result[$key]) && is_array($value)) {
|
||||
$result[$key] = merge([$result[$key], $value]);
|
||||
} else {
|
||||
$result[$key] = $value;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$result[count($result)] = $array;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return join(" ", $result);
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('uncamelize')) {
|
||||
function uncamelize($camel, $splitter = "_")
|
||||
{
|
||||
$camel = preg_replace('/(?!^)[[:upper:]][[:lower:]]/', '$0', preg_replace('/(?!^)[[:upper:]]+/', $splitter . '$0', $camel));
|
||||
return strtolower($camel);
|
||||
}
|
||||
}
|
68
app/Http/Kernel.php
Normal file
68
app/Http/Kernel.php
Normal file
|
@ -0,0 +1,68 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http;
|
||||
|
||||
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
||||
|
||||
class Kernel extends HttpKernel
|
||||
{
|
||||
/**
|
||||
* The application's global HTTP middleware stack.
|
||||
*
|
||||
* These middleware are run during every request to your application.
|
||||
*
|
||||
* @var array<int, class-string|string>
|
||||
*/
|
||||
protected $middleware = [
|
||||
// \App\Http\Middleware\TrustHosts::class,
|
||||
\App\Http\Middleware\TrustProxies::class,
|
||||
\Illuminate\Http\Middleware\HandleCors::class,
|
||||
\App\Http\Middleware\PreventRequestsDuringMaintenance::class,
|
||||
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
|
||||
\App\Http\Middleware\TrimStrings::class,
|
||||
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
|
||||
];
|
||||
|
||||
/**
|
||||
* The application's route middleware groups.
|
||||
*
|
||||
* @var array<string, array<int, class-string|string>>
|
||||
*/
|
||||
protected $middlewareGroups = [
|
||||
'web' => [
|
||||
\App\Http\Middleware\EncryptCookies::class,
|
||||
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
||||
\Illuminate\Session\Middleware\StartSession::class,
|
||||
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
||||
\App\Http\Middleware\VerifyCsrfToken::class,
|
||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
],
|
||||
|
||||
'api' => [
|
||||
// \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
|
||||
\Illuminate\Routing\Middleware\ThrottleRequests::class . ':api',
|
||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* The application's middleware aliases.
|
||||
*
|
||||
* Aliases may be used instead of class names to conveniently assign middleware to routes and groups.
|
||||
*
|
||||
* @var array<string, class-string|string>
|
||||
*/
|
||||
protected $middlewareAliases = [
|
||||
'auth' => \App\Http\Middleware\Authenticate::class,
|
||||
'loggedin' => \App\Http\Middleware\LoggedIn::class,
|
||||
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
||||
'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class,
|
||||
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
|
||||
'can' => \Illuminate\Auth\Middleware\Authorize::class,
|
||||
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
||||
'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
|
||||
'signed' => \App\Http\Middleware\ValidateSignature::class,
|
||||
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
||||
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
|
||||
];
|
||||
}
|
24
app/Http/Middleware/Authenticate.php
Normal file
24
app/Http/Middleware/Authenticate.php
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
|
||||
class Authenticate
|
||||
{
|
||||
/**
|
||||
* Redirect user if they are not authenticated.
|
||||
*/
|
||||
public function handle(Request $request, Closure $next): Response|JsonResponse|RedirectResponse
|
||||
{
|
||||
if (!is_null(request()->user())) {
|
||||
return $next($request);
|
||||
} else {
|
||||
return redirect('login');
|
||||
}
|
||||
}
|
||||
}
|
17
app/Http/Middleware/EncryptCookies.php
Normal file
17
app/Http/Middleware/EncryptCookies.php
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Cookie\Middleware\EncryptCookies as Middleware;
|
||||
|
||||
class EncryptCookies extends Middleware
|
||||
{
|
||||
/**
|
||||
* The names of the cookies that should not be encrypted.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $except = [
|
||||
//
|
||||
];
|
||||
}
|
24
app/Http/Middleware/LoggedIn.php
Normal file
24
app/Http/Middleware/LoggedIn.php
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
|
||||
class LoggedIn
|
||||
{
|
||||
/**
|
||||
* Redirect user if they are authenticated.
|
||||
*/
|
||||
public function handle(Request $request, Closure $next): Response|JsonResponse|RedirectResponse
|
||||
{
|
||||
if (!is_null(request()->user())) {
|
||||
return redirect('/');
|
||||
} else {
|
||||
return $next($request);
|
||||
}
|
||||
}
|
||||
}
|
17
app/Http/Middleware/PreventRequestsDuringMaintenance.php
Normal file
17
app/Http/Middleware/PreventRequestsDuringMaintenance.php
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance as Middleware;
|
||||
|
||||
class PreventRequestsDuringMaintenance extends Middleware
|
||||
{
|
||||
/**
|
||||
* The URIs that should be reachable while maintenance mode is enabled.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $except = [
|
||||
//
|
||||
];
|
||||
}
|
30
app/Http/Middleware/RedirectIfAuthenticated.php
Normal file
30
app/Http/Middleware/RedirectIfAuthenticated.php
Normal file
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use App\Providers\RouteServiceProvider;
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
class RedirectIfAuthenticated
|
||||
{
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
|
||||
*/
|
||||
public function handle(Request $request, Closure $next, string ...$guards): Response
|
||||
{
|
||||
$guards = empty($guards) ? [null] : $guards;
|
||||
|
||||
foreach ($guards as $guard) {
|
||||
if (Auth::guard($guard)->check()) {
|
||||
return redirect(RouteServiceProvider::HOME);
|
||||
}
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
19
app/Http/Middleware/TrimStrings.php
Normal file
19
app/Http/Middleware/TrimStrings.php
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware;
|
||||
|
||||
class TrimStrings extends Middleware
|
||||
{
|
||||
/**
|
||||
* The names of the attributes that should not be trimmed.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $except = [
|
||||
'current_password',
|
||||
'password',
|
||||
'password_confirmation',
|
||||
];
|
||||
}
|
20
app/Http/Middleware/TrustHosts.php
Normal file
20
app/Http/Middleware/TrustHosts.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Http\Middleware\TrustHosts as Middleware;
|
||||
|
||||
class TrustHosts extends Middleware
|
||||
{
|
||||
/**
|
||||
* Get the host patterns that should be trusted.
|
||||
*
|
||||
* @return array<int, string|null>
|
||||
*/
|
||||
public function hosts(): array
|
||||
{
|
||||
return [
|
||||
$this->allSubdomainsOfApplicationUrl(),
|
||||
];
|
||||
}
|
||||
}
|
28
app/Http/Middleware/TrustProxies.php
Normal file
28
app/Http/Middleware/TrustProxies.php
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Http\Middleware\TrustProxies as Middleware;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class TrustProxies extends Middleware
|
||||
{
|
||||
/**
|
||||
* The trusted proxies for this application.
|
||||
*
|
||||
* @var array<int, string>|string|null
|
||||
*/
|
||||
protected $proxies;
|
||||
|
||||
/**
|
||||
* The headers that should be used to detect proxies.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $headers =
|
||||
Request::HEADER_X_FORWARDED_FOR |
|
||||
Request::HEADER_X_FORWARDED_HOST |
|
||||
Request::HEADER_X_FORWARDED_PORT |
|
||||
Request::HEADER_X_FORWARDED_PROTO |
|
||||
Request::HEADER_X_FORWARDED_AWS_ELB;
|
||||
}
|
22
app/Http/Middleware/ValidateSignature.php
Normal file
22
app/Http/Middleware/ValidateSignature.php
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Routing\Middleware\ValidateSignature as Middleware;
|
||||
|
||||
class ValidateSignature extends Middleware
|
||||
{
|
||||
/**
|
||||
* The names of the query string parameters that should be ignored.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $except = [
|
||||
// 'fbclid',
|
||||
// 'utm_campaign',
|
||||
// 'utm_content',
|
||||
// 'utm_medium',
|
||||
// 'utm_source',
|
||||
// 'utm_term',
|
||||
];
|
||||
}
|
17
app/Http/Middleware/VerifyCsrfToken.php
Normal file
17
app/Http/Middleware/VerifyCsrfToken.php
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
|
||||
|
||||
class VerifyCsrfToken extends Middleware
|
||||
{
|
||||
/**
|
||||
* The URIs that should be excluded from CSRF verification.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $except = [
|
||||
//
|
||||
];
|
||||
}
|
21
app/Http/Requests/LoginRequest.php
Normal file
21
app/Http/Requests/LoginRequest.php
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class LoginRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'email' => 'required|email|exists:users',
|
||||
'password' => 'required'
|
||||
];
|
||||
}
|
||||
}
|
751
app/Main/SideMenu.php
Normal file
751
app/Main/SideMenu.php
Normal file
|
@ -0,0 +1,751 @@
|
|||
<?php
|
||||
|
||||
namespace App\Main;
|
||||
|
||||
class SideMenu
|
||||
{
|
||||
/**
|
||||
* List of side menu items.
|
||||
*/
|
||||
public static function menu(): array
|
||||
{
|
||||
return [
|
||||
'dashboard' => [
|
||||
'icon' => 'home',
|
||||
'title' => 'Dashboard',
|
||||
'sub_menu' => [
|
||||
'dashboard-overview-1' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'dashboard-overview-1',
|
||||
'params' => [
|
||||
'layout' => 'side-menu',
|
||||
],
|
||||
'title' => 'Overview 1'
|
||||
],
|
||||
'dashboard-overview-2' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'dashboard-overview-2',
|
||||
'params' => [
|
||||
'layout' => 'side-menu',
|
||||
],
|
||||
'title' => 'Overview 2'
|
||||
],
|
||||
'dashboard-overview-3' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'dashboard-overview-3',
|
||||
'params' => [
|
||||
'layout' => 'side-menu',
|
||||
],
|
||||
'title' => 'Overview 3'
|
||||
],
|
||||
'dashboard-overview-4' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'dashboard-overview-4',
|
||||
'params' => [
|
||||
'layout' => 'side-menu',
|
||||
],
|
||||
'title' => 'Overview 4'
|
||||
]
|
||||
]
|
||||
],
|
||||
'menu-layout' => [
|
||||
'icon' => 'box',
|
||||
'title' => 'Menu Layout',
|
||||
'sub_menu' => [
|
||||
'side-menu' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'dashboard-overview-1',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Side Menu'
|
||||
],
|
||||
'simple-menu' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'dashboard-overview-1',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Simple Menu'
|
||||
],
|
||||
'top-menu' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'dashboard-overview-1',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Top Menu'
|
||||
]
|
||||
]
|
||||
],
|
||||
'e-commerce' => [
|
||||
'icon' => 'shopping-bag',
|
||||
'title' => 'E-Commerce',
|
||||
'sub_menu' => [
|
||||
'categories' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'categories',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Categories'
|
||||
],
|
||||
'add-product' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'add-product',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Add Product',
|
||||
],
|
||||
'products' => [
|
||||
'icon' => 'activity',
|
||||
'title' => 'Products',
|
||||
'sub_menu' => [
|
||||
'product-list' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'product-list',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Product List'
|
||||
],
|
||||
'product-grid' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'product-grid',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Product Grid'
|
||||
]
|
||||
]
|
||||
],
|
||||
'transactions' => [
|
||||
'icon' => 'activity',
|
||||
'title' => 'Transactions',
|
||||
'sub_menu' => [
|
||||
'transaction-list' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'transaction-list',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Transaction List'
|
||||
],
|
||||
'transaction-detail' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'transaction-detail',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Transaction Detail'
|
||||
]
|
||||
]
|
||||
],
|
||||
'sellers' => [
|
||||
'icon' => 'activity',
|
||||
'title' => 'Sellers',
|
||||
'sub_menu' => [
|
||||
'seller-list' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'seller-list',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Seller List'
|
||||
],
|
||||
'seller-detail' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'seller-detail',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Seller Detail'
|
||||
]
|
||||
]
|
||||
],
|
||||
'reviews' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'reviews',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Reviews'
|
||||
],
|
||||
]
|
||||
],
|
||||
'inbox' => [
|
||||
'icon' => 'inbox',
|
||||
'route_name' => 'inbox',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Inbox'
|
||||
],
|
||||
'file-manager' => [
|
||||
'icon' => 'hard-drive',
|
||||
'route_name' => 'file-manager',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'File Manager'
|
||||
],
|
||||
'point-of-sale' => [
|
||||
'icon' => 'credit-card',
|
||||
'route_name' => 'point-of-sale',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Point of Sale'
|
||||
],
|
||||
'chat' => [
|
||||
'icon' => 'message-square',
|
||||
'route_name' => 'chat',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Chat'
|
||||
],
|
||||
'post' => [
|
||||
'icon' => 'file-text',
|
||||
'route_name' => 'post',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Post'
|
||||
],
|
||||
'calendar' => [
|
||||
'icon' => 'calendar',
|
||||
'route_name' => 'calendar',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Calendar'
|
||||
],
|
||||
'divider',
|
||||
'crud' => [
|
||||
'icon' => 'edit',
|
||||
'title' => 'Crud',
|
||||
'sub_menu' => [
|
||||
'crud-data-list' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'crud-data-list',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Data List'
|
||||
],
|
||||
'crud-form' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'crud-form',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Form'
|
||||
]
|
||||
]
|
||||
],
|
||||
'users' => [
|
||||
'icon' => 'users',
|
||||
'title' => 'Users',
|
||||
'sub_menu' => [
|
||||
'users-layout-1' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'users-layout-1',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Layout 1'
|
||||
],
|
||||
'users-layout-2' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'users-layout-2',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Layout 2'
|
||||
],
|
||||
'users-layout-3' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'users-layout-3',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Layout 3'
|
||||
]
|
||||
]
|
||||
],
|
||||
'profile' => [
|
||||
'icon' => 'trello',
|
||||
'title' => 'Profile',
|
||||
'sub_menu' => [
|
||||
'profile-overview-1' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'profile-overview-1',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Overview 1'
|
||||
],
|
||||
'profile-overview-2' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'profile-overview-2',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Overview 2'
|
||||
],
|
||||
'profile-overview-3' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'profile-overview-3',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Overview 3'
|
||||
]
|
||||
]
|
||||
],
|
||||
'pages' => [
|
||||
'icon' => 'layout',
|
||||
'title' => 'Pages',
|
||||
'sub_menu' => [
|
||||
'wizards' => [
|
||||
'icon' => 'activity',
|
||||
'title' => 'Wizards',
|
||||
'sub_menu' => [
|
||||
'wizard-layout-1' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'wizard-layout-1',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Layout 1'
|
||||
],
|
||||
'wizard-layout-2' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'wizard-layout-2',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Layout 2'
|
||||
],
|
||||
'wizard-layout-3' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'wizard-layout-3',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Layout 3'
|
||||
]
|
||||
]
|
||||
],
|
||||
'blog' => [
|
||||
'icon' => 'activity',
|
||||
'title' => 'Blog',
|
||||
'sub_menu' => [
|
||||
'blog-layout-1' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'blog-layout-1',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Layout 1'
|
||||
],
|
||||
'blog-layout-2' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'blog-layout-2',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Layout 2'
|
||||
],
|
||||
'blog-layout-3' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'blog-layout-3',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Layout 3'
|
||||
]
|
||||
]
|
||||
],
|
||||
'pricing' => [
|
||||
'icon' => 'activity',
|
||||
'title' => 'Pricing',
|
||||
'sub_menu' => [
|
||||
'pricing-layout-1' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'pricing-layout-1',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Layout 1'
|
||||
],
|
||||
'pricing-layout-2' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'pricing-layout-2',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Layout 2'
|
||||
]
|
||||
]
|
||||
],
|
||||
'invoice' => [
|
||||
'icon' => 'activity',
|
||||
'title' => 'Invoice',
|
||||
'sub_menu' => [
|
||||
'invoice-layout-1' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'invoice-layout-1',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Layout 1'
|
||||
],
|
||||
'invoice-layout-2' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'invoice-layout-2',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Layout 2'
|
||||
]
|
||||
]
|
||||
],
|
||||
'faq' => [
|
||||
'icon' => 'activity',
|
||||
'title' => 'FAQ',
|
||||
'sub_menu' => [
|
||||
'faq-layout-1' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'faq-layout-1',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Layout 1'
|
||||
],
|
||||
'faq-layout-2' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'faq-layout-2',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Layout 2'
|
||||
],
|
||||
'faq-layout-3' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'faq-layout-3',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Layout 3'
|
||||
]
|
||||
]
|
||||
],
|
||||
'login' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'login',
|
||||
'params' => [
|
||||
'layout' => 'base'
|
||||
],
|
||||
'title' => 'Login'
|
||||
],
|
||||
'register' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'register',
|
||||
'params' => [
|
||||
'layout' => 'base'
|
||||
],
|
||||
'title' => 'Register'
|
||||
],
|
||||
'error-page' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'error-page',
|
||||
'params' => [
|
||||
'layout' => 'base'
|
||||
],
|
||||
'title' => 'Error Page'
|
||||
],
|
||||
'update-profile' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'update-profile',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Update profile'
|
||||
],
|
||||
'change-password' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'change-password',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Change Password'
|
||||
]
|
||||
]
|
||||
],
|
||||
'divider',
|
||||
'components' => [
|
||||
'icon' => 'inbox',
|
||||
'title' => 'Components',
|
||||
'sub_menu' => [
|
||||
'grid' => [
|
||||
'icon' => 'activity',
|
||||
'title' => 'Grid',
|
||||
'sub_menu' => [
|
||||
'regular-table' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'regular-table',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Regular Table'
|
||||
],
|
||||
'tabulator' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'tabulator',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Tabulator'
|
||||
]
|
||||
]
|
||||
],
|
||||
'overlay' => [
|
||||
'icon' => 'activity',
|
||||
'title' => 'Overlay',
|
||||
'sub_menu' => [
|
||||
'modal' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'modal',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Modal'
|
||||
],
|
||||
'slide-over' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'slide-over',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Slide Over'
|
||||
],
|
||||
'notification' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'notification',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Notification'
|
||||
],
|
||||
]
|
||||
],
|
||||
'tab' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'tab',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Tab'
|
||||
],
|
||||
'accordion' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'accordion',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Accordion'
|
||||
],
|
||||
'button' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'button',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Button'
|
||||
],
|
||||
'alert' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'alert',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Alert'
|
||||
],
|
||||
'progress-bar' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'progress-bar',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Progress Bar'
|
||||
],
|
||||
'tooltip' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'tooltip',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Tooltip'
|
||||
],
|
||||
'dropdown' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'dropdown',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Dropdown'
|
||||
],
|
||||
'typography' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'typography',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Typography'
|
||||
],
|
||||
'icon' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'icon',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Icon'
|
||||
],
|
||||
'loading-icon' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'loading-icon',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Loading Icon'
|
||||
]
|
||||
]
|
||||
],
|
||||
'forms' => [
|
||||
'icon' => 'sidebar',
|
||||
'title' => 'Forms',
|
||||
'sub_menu' => [
|
||||
'regular-form' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'regular-form',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Regular Form'
|
||||
],
|
||||
'datepicker' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'datepicker',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Datepicker'
|
||||
],
|
||||
'tom-select' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'tom-select',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Tom Select'
|
||||
],
|
||||
'file-upload' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'file-upload',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'File Upload'
|
||||
],
|
||||
'wysiwyg-editor' => [
|
||||
'icon' => 'activity',
|
||||
'title' => 'Wysiwyg Editor',
|
||||
'sub_menu' => [
|
||||
'wysiwyg-editor-classic' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'wysiwyg-editor-classic',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Classic'
|
||||
],
|
||||
'wysiwyg-editor-inline' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'wysiwyg-editor-inline',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Inline'
|
||||
],
|
||||
'wysiwyg-editor-balloon' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'wysiwyg-editor-balloon',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Balloon'
|
||||
],
|
||||
'wysiwyg-editor-balloon-block' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'wysiwyg-editor-balloon-block',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Balloon Block'
|
||||
],
|
||||
'wysiwyg-editor-document' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'wysiwyg-editor-document',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Document'
|
||||
],
|
||||
]
|
||||
],
|
||||
'validation' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'validation',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Validation'
|
||||
]
|
||||
]
|
||||
],
|
||||
'widgets' => [
|
||||
'icon' => 'hard-drive',
|
||||
'title' => 'Widgets',
|
||||
'sub_menu' => [
|
||||
'chart' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'chart',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Chart'
|
||||
],
|
||||
'slider' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'slider',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Slider'
|
||||
],
|
||||
'image-zoom' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'image-zoom',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Image Zoom'
|
||||
]
|
||||
]
|
||||
]
|
||||
];
|
||||
}
|
||||
}
|
751
app/Main/SimpleMenu.php
Normal file
751
app/Main/SimpleMenu.php
Normal file
|
@ -0,0 +1,751 @@
|
|||
<?php
|
||||
|
||||
namespace App\Main;
|
||||
|
||||
class SimpleMenu
|
||||
{
|
||||
/**
|
||||
* List of simple menu items.
|
||||
*/
|
||||
public static function menu(): array
|
||||
{
|
||||
return [
|
||||
'dashboard' => [
|
||||
'icon' => 'home',
|
||||
'title' => 'Dashboard',
|
||||
'sub_menu' => [
|
||||
'dashboard-overview-1' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'dashboard-overview-1',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu',
|
||||
],
|
||||
'title' => 'Overview 1'
|
||||
],
|
||||
'dashboard-overview-2' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'dashboard-overview-2',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu',
|
||||
],
|
||||
'title' => 'Overview 2'
|
||||
],
|
||||
'dashboard-overview-3' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'dashboard-overview-3',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu',
|
||||
],
|
||||
'title' => 'Overview 3'
|
||||
],
|
||||
'dashboard-overview-4' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'dashboard-overview-4',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu',
|
||||
],
|
||||
'title' => 'Overview 4'
|
||||
]
|
||||
]
|
||||
],
|
||||
'menu-layout' => [
|
||||
'icon' => 'box',
|
||||
'title' => 'Menu Layout',
|
||||
'sub_menu' => [
|
||||
'side-menu' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'dashboard-overview-1',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Side Menu'
|
||||
],
|
||||
'simple-menu' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'dashboard-overview-1',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Simple Menu'
|
||||
],
|
||||
'top-menu' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'dashboard-overview-1',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Top Menu'
|
||||
]
|
||||
]
|
||||
],
|
||||
'e-commerce' => [
|
||||
'icon' => 'shopping-bag',
|
||||
'title' => 'E-Commerce',
|
||||
'sub_menu' => [
|
||||
'categories' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'categories',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Categories'
|
||||
],
|
||||
'add-product' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'add-product',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Add Product',
|
||||
],
|
||||
'products' => [
|
||||
'icon' => 'activity',
|
||||
'title' => 'Products',
|
||||
'sub_menu' => [
|
||||
'product-list' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'product-list',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Product List'
|
||||
],
|
||||
'product-grid' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'product-grid',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Product Grid'
|
||||
]
|
||||
]
|
||||
],
|
||||
'transactions' => [
|
||||
'icon' => 'activity',
|
||||
'title' => 'Transactions',
|
||||
'sub_menu' => [
|
||||
'transaction-list' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'transaction-list',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Transaction List'
|
||||
],
|
||||
'transaction-detail' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'transaction-detail',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Transaction Detail'
|
||||
]
|
||||
]
|
||||
],
|
||||
'sellers' => [
|
||||
'icon' => 'activity',
|
||||
'title' => 'Sellers',
|
||||
'sub_menu' => [
|
||||
'seller-list' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'seller-list',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Seller List'
|
||||
],
|
||||
'seller-detail' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'seller-detail',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Seller Detail'
|
||||
]
|
||||
]
|
||||
],
|
||||
'reviews' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'reviews',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Reviews'
|
||||
],
|
||||
]
|
||||
],
|
||||
'inbox' => [
|
||||
'icon' => 'inbox',
|
||||
'route_name' => 'inbox',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Inbox'
|
||||
],
|
||||
'file-manager' => [
|
||||
'icon' => 'hard-drive',
|
||||
'route_name' => 'file-manager',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'File Manager'
|
||||
],
|
||||
'point-of-sale' => [
|
||||
'icon' => 'credit-card',
|
||||
'route_name' => 'point-of-sale',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Point of Sale'
|
||||
],
|
||||
'chat' => [
|
||||
'icon' => 'message-square',
|
||||
'route_name' => 'chat',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Chat'
|
||||
],
|
||||
'post' => [
|
||||
'icon' => 'file-text',
|
||||
'route_name' => 'post',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Post'
|
||||
],
|
||||
'calendar' => [
|
||||
'icon' => 'calendar',
|
||||
'route_name' => 'calendar',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Calendar'
|
||||
],
|
||||
'divider',
|
||||
'crud' => [
|
||||
'icon' => 'edit',
|
||||
'title' => 'Crud',
|
||||
'sub_menu' => [
|
||||
'crud-data-list' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'crud-data-list',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Data List'
|
||||
],
|
||||
'crud-form' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'crud-form',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Form'
|
||||
]
|
||||
]
|
||||
],
|
||||
'users' => [
|
||||
'icon' => 'users',
|
||||
'title' => 'Users',
|
||||
'sub_menu' => [
|
||||
'users-layout-1' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'users-layout-1',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Layout 1'
|
||||
],
|
||||
'users-layout-2' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'users-layout-2',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Layout 2'
|
||||
],
|
||||
'users-layout-3' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'users-layout-3',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Layout 3'
|
||||
]
|
||||
]
|
||||
],
|
||||
'profile' => [
|
||||
'icon' => 'trello',
|
||||
'title' => 'Profile',
|
||||
'sub_menu' => [
|
||||
'profile-overview-1' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'profile-overview-1',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Overview 1'
|
||||
],
|
||||
'profile-overview-2' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'profile-overview-2',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Overview 2'
|
||||
],
|
||||
'profile-overview-3' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'profile-overview-3',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Overview 3'
|
||||
]
|
||||
]
|
||||
],
|
||||
'pages' => [
|
||||
'icon' => 'layout',
|
||||
'title' => 'Pages',
|
||||
'sub_menu' => [
|
||||
'wizards' => [
|
||||
'icon' => 'activity',
|
||||
'title' => 'Wizards',
|
||||
'sub_menu' => [
|
||||
'wizard-layout-1' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'wizard-layout-1',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Layout 1'
|
||||
],
|
||||
'wizard-layout-2' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'wizard-layout-2',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Layout 2'
|
||||
],
|
||||
'wizard-layout-3' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'wizard-layout-3',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Layout 3'
|
||||
]
|
||||
]
|
||||
],
|
||||
'blog' => [
|
||||
'icon' => 'activity',
|
||||
'title' => 'Blog',
|
||||
'sub_menu' => [
|
||||
'blog-layout-1' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'blog-layout-1',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Layout 1'
|
||||
],
|
||||
'blog-layout-2' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'blog-layout-2',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Layout 2'
|
||||
],
|
||||
'blog-layout-3' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'blog-layout-3',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Layout 3'
|
||||
]
|
||||
]
|
||||
],
|
||||
'pricing' => [
|
||||
'icon' => 'activity',
|
||||
'title' => 'Pricing',
|
||||
'sub_menu' => [
|
||||
'pricing-layout-1' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'pricing-layout-1',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Layout 1'
|
||||
],
|
||||
'pricing-layout-2' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'pricing-layout-2',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Layout 2'
|
||||
]
|
||||
]
|
||||
],
|
||||
'invoice' => [
|
||||
'icon' => 'activity',
|
||||
'title' => 'Invoice',
|
||||
'sub_menu' => [
|
||||
'invoice-layout-1' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'invoice-layout-1',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Layout 1'
|
||||
],
|
||||
'invoice-layout-2' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'invoice-layout-2',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Layout 2'
|
||||
]
|
||||
]
|
||||
],
|
||||
'faq' => [
|
||||
'icon' => 'activity',
|
||||
'title' => 'FAQ',
|
||||
'sub_menu' => [
|
||||
'faq-layout-1' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'faq-layout-1',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Layout 1'
|
||||
],
|
||||
'faq-layout-2' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'faq-layout-2',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Layout 2'
|
||||
],
|
||||
'faq-layout-3' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'faq-layout-3',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Layout 3'
|
||||
]
|
||||
]
|
||||
],
|
||||
'login' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'login',
|
||||
'params' => [
|
||||
'layout' => 'base'
|
||||
],
|
||||
'title' => 'Login'
|
||||
],
|
||||
'register' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'register',
|
||||
'params' => [
|
||||
'layout' => 'base'
|
||||
],
|
||||
'title' => 'Register'
|
||||
],
|
||||
'error-page' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'error-page',
|
||||
'params' => [
|
||||
'layout' => 'base'
|
||||
],
|
||||
'title' => 'Error Page'
|
||||
],
|
||||
'update-profile' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'update-profile',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Update profile'
|
||||
],
|
||||
'change-password' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'change-password',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Change Password'
|
||||
]
|
||||
]
|
||||
],
|
||||
'divider',
|
||||
'components' => [
|
||||
'icon' => 'inbox',
|
||||
'title' => 'Components',
|
||||
'sub_menu' => [
|
||||
'grid' => [
|
||||
'icon' => 'activity',
|
||||
'title' => 'Grid',
|
||||
'sub_menu' => [
|
||||
'regular-table' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'regular-table',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Regular Table'
|
||||
],
|
||||
'tabulator' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'tabulator',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Tabulator'
|
||||
]
|
||||
]
|
||||
],
|
||||
'overlay' => [
|
||||
'icon' => 'activity',
|
||||
'title' => 'Overlay',
|
||||
'sub_menu' => [
|
||||
'modal' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'modal',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Modal'
|
||||
],
|
||||
'slide-over' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'slide-over',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Slide Over'
|
||||
],
|
||||
'notification' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'notification',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Notification'
|
||||
],
|
||||
]
|
||||
],
|
||||
'tab' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'tab',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Tab'
|
||||
],
|
||||
'accordion' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'accordion',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Accordion'
|
||||
],
|
||||
'button' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'button',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Button'
|
||||
],
|
||||
'alert' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'alert',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Alert'
|
||||
],
|
||||
'progress-bar' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'progress-bar',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Progress Bar'
|
||||
],
|
||||
'tooltip' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'tooltip',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Tooltip'
|
||||
],
|
||||
'dropdown' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'dropdown',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Dropdown'
|
||||
],
|
||||
'typography' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'typography',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Typography'
|
||||
],
|
||||
'icon' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'icon',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Icon'
|
||||
],
|
||||
'loading-icon' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'loading-icon',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Loading Icon'
|
||||
]
|
||||
]
|
||||
],
|
||||
'forms' => [
|
||||
'icon' => 'sidebar',
|
||||
'title' => 'Forms',
|
||||
'sub_menu' => [
|
||||
'regular-form' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'regular-form',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Regular Form'
|
||||
],
|
||||
'datepicker' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'datepicker',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Datepicker'
|
||||
],
|
||||
'tom-select' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'tom-select',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Tom Select'
|
||||
],
|
||||
'file-upload' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'file-upload',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'File Upload'
|
||||
],
|
||||
'wysiwyg-editor' => [
|
||||
'icon' => 'activity',
|
||||
'title' => 'Wysiwyg Editor',
|
||||
'sub_menu' => [
|
||||
'wysiwyg-editor-classic' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'wysiwyg-editor-classic',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Classic'
|
||||
],
|
||||
'wysiwyg-editor-inline' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'wysiwyg-editor-inline',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Inline'
|
||||
],
|
||||
'wysiwyg-editor-balloon' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'wysiwyg-editor-balloon',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Balloon'
|
||||
],
|
||||
'wysiwyg-editor-balloon-block' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'wysiwyg-editor-balloon-block',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Balloon Block'
|
||||
],
|
||||
'wysiwyg-editor-document' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'wysiwyg-editor-document',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Document'
|
||||
],
|
||||
]
|
||||
],
|
||||
'validation' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'validation',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Validation'
|
||||
]
|
||||
]
|
||||
],
|
||||
'widgets' => [
|
||||
'icon' => 'hard-drive',
|
||||
'title' => 'Widgets',
|
||||
'sub_menu' => [
|
||||
'chart' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'chart',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Chart'
|
||||
],
|
||||
'slider' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'slider',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Slider'
|
||||
],
|
||||
'image-zoom' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'image-zoom',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Image Zoom'
|
||||
]
|
||||
]
|
||||
]
|
||||
];
|
||||
}
|
||||
}
|
737
app/Main/TopMenu.php
Normal file
737
app/Main/TopMenu.php
Normal file
|
@ -0,0 +1,737 @@
|
|||
<?php
|
||||
|
||||
namespace App\Main;
|
||||
|
||||
class TopMenu
|
||||
{
|
||||
/**
|
||||
* List of top menu items.
|
||||
*/
|
||||
public static function menu(): array
|
||||
{
|
||||
return [
|
||||
'dashboard' => [
|
||||
'icon' => 'home',
|
||||
'title' => 'Dashboard',
|
||||
'sub_menu' => [
|
||||
'dashboard-overview-1' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'dashboard-overview-1',
|
||||
'params' => [
|
||||
'layout' => 'top-menu',
|
||||
],
|
||||
'title' => 'Overview 1'
|
||||
],
|
||||
'dashboard-overview-2' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'dashboard-overview-2',
|
||||
'params' => [
|
||||
'layout' => 'top-menu',
|
||||
],
|
||||
'title' => 'Overview 2'
|
||||
],
|
||||
'dashboard-overview-3' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'dashboard-overview-3',
|
||||
'params' => [
|
||||
'layout' => 'top-menu',
|
||||
],
|
||||
'title' => 'Overview 3'
|
||||
],
|
||||
'dashboard-overview-4' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'dashboard-overview-4',
|
||||
'params' => [
|
||||
'layout' => 'top-menu',
|
||||
],
|
||||
'title' => 'Overview 4'
|
||||
]
|
||||
]
|
||||
],
|
||||
'menu-layout' => [
|
||||
'icon' => 'box',
|
||||
'title' => 'Menu Layout',
|
||||
'sub_menu' => [
|
||||
'side-menu' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'dashboard-overview-1',
|
||||
'params' => [
|
||||
'layout' => 'side-menu'
|
||||
],
|
||||
'title' => 'Side Menu'
|
||||
],
|
||||
'simple-menu' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'dashboard-overview-1',
|
||||
'params' => [
|
||||
'layout' => 'simple-menu'
|
||||
],
|
||||
'title' => 'Simple Menu'
|
||||
],
|
||||
'top-menu' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'dashboard-overview-1',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Top Menu'
|
||||
]
|
||||
]
|
||||
],
|
||||
'apps' => [
|
||||
'icon' => 'activity',
|
||||
'title' => 'Apps',
|
||||
'sub_menu' => [
|
||||
'users' => [
|
||||
'icon' => 'users',
|
||||
'title' => 'Users',
|
||||
'sub_menu' => [
|
||||
'users-layout-1' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'users-layout-1',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Layout 1'
|
||||
],
|
||||
'users-layout-2' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'users-layout-2',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Layout 2'
|
||||
],
|
||||
'users-layout-3' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'users-layout-3',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Layout 3'
|
||||
]
|
||||
]
|
||||
],
|
||||
'profile' => [
|
||||
'icon' => 'trello',
|
||||
'title' => 'Profile',
|
||||
'sub_menu' => [
|
||||
'profile-overview-1' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'profile-overview-1',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Overview 1'
|
||||
],
|
||||
'profile-overview-2' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'profile-overview-2',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Overview 2'
|
||||
],
|
||||
'profile-overview-3' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'profile-overview-3',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Overview 3'
|
||||
]
|
||||
]
|
||||
],
|
||||
'e-commerce' => [
|
||||
'icon' => 'shopping-bag',
|
||||
'title' => 'E-Commerce',
|
||||
'sub_menu' => [
|
||||
'categories' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'categories',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Categories'
|
||||
],
|
||||
'add-product' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'add-product',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Add Product',
|
||||
],
|
||||
'product-list' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'product-list',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Product List'
|
||||
],
|
||||
'product-grid' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'product-grid',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Product Grid'
|
||||
],
|
||||
'transaction-list' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'transaction-list',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Transaction List'
|
||||
],
|
||||
'transaction-detail' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'transaction-detail',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Transaction Detail'
|
||||
],
|
||||
'seller-list' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'seller-list',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Seller List'
|
||||
],
|
||||
'seller-detail' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'seller-detail',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Seller Detail'
|
||||
],
|
||||
'reviews' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'reviews',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Reviews'
|
||||
],
|
||||
]
|
||||
],
|
||||
'inbox' => [
|
||||
'icon' => 'inbox',
|
||||
'route_name' => 'inbox',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Inbox'
|
||||
],
|
||||
'file-manager' => [
|
||||
'icon' => 'folder',
|
||||
'route_name' => 'file-manager',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'File Manager'
|
||||
],
|
||||
'point-of-sale' => [
|
||||
'icon' => 'credit-card',
|
||||
'route_name' => 'point-of-sale',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Point of Sale'
|
||||
],
|
||||
'chat' => [
|
||||
'icon' => 'message-square',
|
||||
'route_name' => 'chat',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Chat'
|
||||
],
|
||||
'post' => [
|
||||
'icon' => 'file-text',
|
||||
'route_name' => 'post',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Post'
|
||||
],
|
||||
'calendar' => [
|
||||
'icon' => 'calendar',
|
||||
'route_name' => 'calendar',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Calendar'
|
||||
],
|
||||
'crud' => [
|
||||
'icon' => 'edit',
|
||||
'title' => 'Crud',
|
||||
'sub_menu' => [
|
||||
'crud-data-list' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'crud-data-list',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Data List'
|
||||
],
|
||||
'crud-form' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'crud-form',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Form'
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
],
|
||||
'pages' => [
|
||||
'icon' => 'layout',
|
||||
'title' => 'Pages',
|
||||
'sub_menu' => [
|
||||
'wizards' => [
|
||||
'icon' => 'activity',
|
||||
'title' => 'Wizards',
|
||||
'sub_menu' => [
|
||||
'wizard-layout-1' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'wizard-layout-1',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Layout 1'
|
||||
],
|
||||
'wizard-layout-2' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'wizard-layout-2',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Layout 2'
|
||||
],
|
||||
'wizard-layout-3' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'wizard-layout-3',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Layout 3'
|
||||
]
|
||||
]
|
||||
],
|
||||
'blog' => [
|
||||
'icon' => 'activity',
|
||||
'title' => 'Blog',
|
||||
'sub_menu' => [
|
||||
'blog-layout-1' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'blog-layout-1',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Layout 1'
|
||||
],
|
||||
'blog-layout-2' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'blog-layout-2',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Layout 2'
|
||||
],
|
||||
'blog-layout-3' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'blog-layout-3',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Layout 3'
|
||||
]
|
||||
]
|
||||
],
|
||||
'pricing' => [
|
||||
'icon' => 'activity',
|
||||
'title' => 'Pricing',
|
||||
'sub_menu' => [
|
||||
'pricing-layout-1' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'pricing-layout-1',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Layout 1'
|
||||
],
|
||||
'pricing-layout-2' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'pricing-layout-2',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Layout 2'
|
||||
]
|
||||
]
|
||||
],
|
||||
'invoice' => [
|
||||
'icon' => 'activity',
|
||||
'title' => 'Invoice',
|
||||
'sub_menu' => [
|
||||
'invoice-layout-1' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'invoice-layout-1',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Layout 1'
|
||||
],
|
||||
'invoice-layout-2' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'invoice-layout-2',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Layout 2'
|
||||
]
|
||||
]
|
||||
],
|
||||
'faq' => [
|
||||
'icon' => 'activity',
|
||||
'title' => 'FAQ',
|
||||
'sub_menu' => [
|
||||
'faq-layout-1' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'faq-layout-1',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Layout 1'
|
||||
],
|
||||
'faq-layout-2' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'faq-layout-2',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Layout 2'
|
||||
],
|
||||
'faq-layout-3' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'faq-layout-3',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Layout 3'
|
||||
]
|
||||
]
|
||||
],
|
||||
'login' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'login',
|
||||
'params' => [
|
||||
'layout' => 'base'
|
||||
],
|
||||
'title' => 'Login'
|
||||
],
|
||||
'register' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'register',
|
||||
'params' => [
|
||||
'layout' => 'base'
|
||||
],
|
||||
'title' => 'Register'
|
||||
],
|
||||
'error-page' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'error-page',
|
||||
'params' => [
|
||||
'layout' => 'base'
|
||||
],
|
||||
'title' => 'Error Page'
|
||||
],
|
||||
'update-profile' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'update-profile',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Update profile'
|
||||
],
|
||||
'change-password' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'change-password',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Change Password'
|
||||
]
|
||||
]
|
||||
],
|
||||
'components' => [
|
||||
'icon' => 'inbox',
|
||||
'title' => 'Components',
|
||||
'sub_menu' => [
|
||||
'grid' => [
|
||||
'icon' => 'activity',
|
||||
'title' => 'Grid',
|
||||
'sub_menu' => [
|
||||
'regular-table' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'regular-table',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Regular Table'
|
||||
],
|
||||
'tabulator' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'tabulator',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Tabulator'
|
||||
]
|
||||
]
|
||||
],
|
||||
'overlay' => [
|
||||
'icon' => 'activity',
|
||||
'title' => 'Overlay',
|
||||
'sub_menu' => [
|
||||
'modal' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'modal',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Modal'
|
||||
],
|
||||
'slide-over' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'slide-over',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Slide Over'
|
||||
],
|
||||
'notification' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'notification',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Notification'
|
||||
],
|
||||
]
|
||||
],
|
||||
'tab' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'tab',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Tab'
|
||||
],
|
||||
'accordion' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'accordion',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Accordion'
|
||||
],
|
||||
'button' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'button',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Button'
|
||||
],
|
||||
'alert' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'alert',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Alert'
|
||||
],
|
||||
'progress-bar' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'progress-bar',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Progress Bar'
|
||||
],
|
||||
'tooltip' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'tooltip',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Tooltip'
|
||||
],
|
||||
'dropdown' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'dropdown',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Dropdown'
|
||||
],
|
||||
'typography' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'typography',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Typography'
|
||||
],
|
||||
'icon' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'icon',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Icon'
|
||||
],
|
||||
'loading-icon' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'loading-icon',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Loading Icon'
|
||||
]
|
||||
]
|
||||
],
|
||||
'forms' => [
|
||||
'icon' => 'sidebar',
|
||||
'title' => 'Forms',
|
||||
'sub_menu' => [
|
||||
'regular-form' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'regular-form',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Regular Form'
|
||||
],
|
||||
'datepicker' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'datepicker',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Datepicker'
|
||||
],
|
||||
'tom-select' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'tom-select',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Tom Select'
|
||||
],
|
||||
'file-upload' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'file-upload',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'File Upload'
|
||||
],
|
||||
'wysiwyg-editor' => [
|
||||
'icon' => 'activity',
|
||||
'title' => 'Wysiwyg Editor',
|
||||
'sub_menu' => [
|
||||
'wysiwyg-editor-classic' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'wysiwyg-editor-classic',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Classic'
|
||||
],
|
||||
'wysiwyg-editor-inline' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'wysiwyg-editor-inline',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Inline'
|
||||
],
|
||||
'wysiwyg-editor-balloon' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'wysiwyg-editor-balloon',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Balloon'
|
||||
],
|
||||
'wysiwyg-editor-balloon-block' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'wysiwyg-editor-balloon-block',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Balloon Block'
|
||||
],
|
||||
'wysiwyg-editor-document' => [
|
||||
'icon' => 'zap',
|
||||
'route_name' => 'wysiwyg-editor-document',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Document'
|
||||
],
|
||||
]
|
||||
],
|
||||
'validation' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'validation',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Validation'
|
||||
]
|
||||
]
|
||||
],
|
||||
'widgets' => [
|
||||
'icon' => 'hard-drive',
|
||||
'title' => 'Widgets',
|
||||
'sub_menu' => [
|
||||
'chart' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'chart',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Chart'
|
||||
],
|
||||
'slider' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'slider',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Slider'
|
||||
],
|
||||
'image-zoom' => [
|
||||
'icon' => 'activity',
|
||||
'route_name' => 'image-zoom',
|
||||
'params' => [
|
||||
'layout' => 'top-menu'
|
||||
],
|
||||
'title' => 'Image Zoom'
|
||||
]
|
||||
]
|
||||
]
|
||||
];
|
||||
}
|
||||
}
|
15
app/Models/Category.php
Normal file
15
app/Models/Category.php
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Category extends Model
|
||||
{
|
||||
use HasFactory, SoftDeletes;
|
||||
|
||||
protected $table = "route_categories";
|
||||
protected $fillable = ['name_it', 'name_en', 'description_it', 'description_en', 'icon'];
|
||||
}
|
19
app/Models/Feedback.php
Normal file
19
app/Models/Feedback.php
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Feedback extends Model
|
||||
{
|
||||
use HasFactory, SoftDeletes;
|
||||
|
||||
protected $fillable = ['title', 'body', 'rating', 'user_nickname'];
|
||||
|
||||
public function routeFeedback()
|
||||
{
|
||||
return $this->belongsToMany(RouteSportDetails::class, 'route_feedbacks', 'feedback_id', 'route_sport_detail_id');
|
||||
}
|
||||
}
|
15
app/Models/Picture.php
Normal file
15
app/Models/Picture.php
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Picture extends Model
|
||||
{
|
||||
use HasFactory, SoftDeletes;
|
||||
|
||||
protected $fillable = ['filename', 'description_it', 'description_en', 'file_size'];
|
||||
}
|
||||
|
19
app/Models/Placemark.php
Normal file
19
app/Models/Placemark.php
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Placemark extends Model
|
||||
{
|
||||
use HasFactory, SoftDeletes;
|
||||
|
||||
protected $fillable = ['sequence_number', 'name_it', 'name_en', 'description_it', 'description_en', 'latitude', 'longitude'];
|
||||
|
||||
public function routeSportDetailPlacemark()
|
||||
{
|
||||
return $this->belongsToMany(RouteSportDetails::class, 'route_sport_detail_placemark', 'placemark_id', 'route_sport_detail_id');
|
||||
}
|
||||
}
|
34
app/Models/Route.php
Normal file
34
app/Models/Route.php
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Route extends Model
|
||||
{
|
||||
use HasFactory, SoftDeletes;
|
||||
|
||||
protected $fillable = ['name_it', 'name_en', 'description_it', 'description_en', 'route_category_id'];
|
||||
|
||||
public function routeSportDetails()
|
||||
{
|
||||
return $this->hasMany(RouteSportDetails::class, 'route_id');
|
||||
}
|
||||
|
||||
public function pictures()
|
||||
{
|
||||
return $this->belongsToMany(Picture::class, 'route_picture', 'route_id', 'picture_id');
|
||||
}
|
||||
|
||||
public function category()
|
||||
{
|
||||
return $this->belongsTo(Category::class, 'route_category_id');
|
||||
}
|
||||
|
||||
public function sport()
|
||||
{
|
||||
return $this->belongsTo(Sports::class, 'sport_id');
|
||||
}
|
||||
}
|
11
app/Models/RouteMap.php
Normal file
11
app/Models/RouteMap.php
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class RouteMap extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
}
|
19
app/Models/RouteSportDetails.php
Normal file
19
app/Models/RouteSportDetails.php
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class RouteSportDetails extends Model
|
||||
{
|
||||
use HasFactory, SoftDeletes;
|
||||
|
||||
protected $fillable = ['route_id', 'sport_id', 'short_description_it', 'short_description_en', 'gpx_path', 'distance', 'duration', 'elevation_gain', 'elevation_loss', 'altitude_max', 'altitude_min', 'difficulty_it', 'difficulty_en', 'route_type_it', 'route_type_en'];
|
||||
|
||||
public function sport()
|
||||
{
|
||||
return $this->belongsTo(Sport::class, 'sport_id');
|
||||
}
|
||||
}
|
14
app/Models/Sport.php
Normal file
14
app/Models/Sport.php
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Sport extends Model
|
||||
{
|
||||
use HasFactory, SoftDeletes;
|
||||
|
||||
protected $fillable = ['name_it', 'name_en', 'description_it', 'description_en', 'icon'];
|
||||
}
|
65
app/Models/User.php
Normal file
65
app/Models/User.php
Normal file
|
@ -0,0 +1,65 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
// use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Laravel\Sanctum\HasApiTokens;
|
||||
|
||||
class User extends Authenticatable
|
||||
{
|
||||
use HasApiTokens, HasFactory, Notifiable;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'email',
|
||||
'password',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be hidden for serialization.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $hidden = [
|
||||
'password',
|
||||
'remember_token',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast.
|
||||
*
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected $casts = [
|
||||
'email_verified_at' => 'datetime',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that appends to returned entities.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $appends = ['photo'];
|
||||
|
||||
/**
|
||||
* The getter that return accessible URL for user photo.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public function getPhotoUrlAttribute(): string
|
||||
{
|
||||
if ($this->foto !== null) {
|
||||
return url('media/user/' . $this->id . '/' . $this->foto);
|
||||
} else {
|
||||
return url('media-example/no-image.png');
|
||||
}
|
||||
}
|
||||
}
|
24
app/Providers/AppServiceProvider.php
Normal file
24
app/Providers/AppServiceProvider.php
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Register any application services.
|
||||
*/
|
||||
public function register(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
26
app/Providers/AuthServiceProvider.php
Normal file
26
app/Providers/AuthServiceProvider.php
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
// use Illuminate\Support\Facades\Gate;
|
||||
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
||||
|
||||
class AuthServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* The model to policy mappings for the application.
|
||||
*
|
||||
* @var array<class-string, class-string>
|
||||
*/
|
||||
protected $policies = [
|
||||
//
|
||||
];
|
||||
|
||||
/**
|
||||
* Register any authentication / authorization services.
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
19
app/Providers/BroadcastServiceProvider.php
Normal file
19
app/Providers/BroadcastServiceProvider.php
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\Facades\Broadcast;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class BroadcastServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
Broadcast::routes();
|
||||
|
||||
require base_path('routes/channels.php');
|
||||
}
|
||||
}
|
38
app/Providers/EventServiceProvider.php
Normal file
38
app/Providers/EventServiceProvider.php
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Auth\Events\Registered;
|
||||
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
|
||||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
|
||||
class EventServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* The event to listener mappings for the application.
|
||||
*
|
||||
* @var array<class-string, array<int, class-string>>
|
||||
*/
|
||||
protected $listen = [
|
||||
Registered::class => [
|
||||
SendEmailVerificationNotification::class,
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* Register any events for your application.
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if events and listeners should be automatically discovered.
|
||||
*/
|
||||
public function shouldDiscoverEvents(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
40
app/Providers/RouteServiceProvider.php
Normal file
40
app/Providers/RouteServiceProvider.php
Normal file
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Cache\RateLimiting\Limit;
|
||||
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\RateLimiter;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
class RouteServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* The path to your application's "home" route.
|
||||
*
|
||||
* Typically, users are redirected here after authentication.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public const HOME = '/home';
|
||||
|
||||
/**
|
||||
* Define your route model bindings, pattern filters, and other route configuration.
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
RateLimiter::for('api', function (Request $request) {
|
||||
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
|
||||
});
|
||||
|
||||
$this->routes(function () {
|
||||
Route::middleware('api')
|
||||
->prefix('api')
|
||||
->group(base_path('routes/api.php'));
|
||||
|
||||
Route::middleware('web')
|
||||
->group(base_path('routes/web.php'));
|
||||
});
|
||||
}
|
||||
}
|
33
app/Providers/ViewServiceProvider.php
Normal file
33
app/Providers/ViewServiceProvider.php
Normal file
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\Facades\View;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class ViewServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Register any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
View::composer('*', 'App\View\Composers\MenuComposer');
|
||||
View::composer('*', 'App\View\Composers\FakerComposer');
|
||||
View::composer('*', 'App\View\Composers\DarkModeComposer');
|
||||
View::composer('*', 'App\View\Composers\LoggedInUserComposer');
|
||||
View::composer('*', 'App\View\Composers\ColorSchemeComposer');
|
||||
}
|
||||
}
|
19
app/View/Composers/ColorSchemeComposer.php
Normal file
19
app/View/Composers/ColorSchemeComposer.php
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
namespace App\View\Composers;
|
||||
|
||||
use Illuminate\View\View;
|
||||
|
||||
class ColorSchemeComposer
|
||||
{
|
||||
/**
|
||||
* Bind color scheme value to the view.
|
||||
*/
|
||||
public function compose(View $view): void
|
||||
{
|
||||
$view->with(
|
||||
'colorScheme',
|
||||
session()->has('color_scheme') ? session('color_scheme') : "default"
|
||||
);
|
||||
}
|
||||
}
|
19
app/View/Composers/DarkModeComposer.php
Normal file
19
app/View/Composers/DarkModeComposer.php
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
namespace App\View\Composers;
|
||||
|
||||
use Illuminate\View\View;
|
||||
|
||||
class DarkModeComposer
|
||||
{
|
||||
/**
|
||||
* Bind dark mode value to the view.
|
||||
*/
|
||||
public function compose(View $view): void
|
||||
{
|
||||
$view->with(
|
||||
'darkMode',
|
||||
session()->has('dark_mode') ? filter_var(session('dark_mode'), FILTER_VALIDATE_BOOLEAN) : false
|
||||
);
|
||||
}
|
||||
}
|
287
app/View/Composers/FakerComposer.php
Normal file
287
app/View/Composers/FakerComposer.php
Normal file
|
@ -0,0 +1,287 @@
|
|||
<?php
|
||||
|
||||
namespace App\View\Composers;
|
||||
|
||||
use Illuminate\View\View;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
class FakerComposer
|
||||
{
|
||||
public function fakeUsers(): Collection
|
||||
{
|
||||
$users = collect([
|
||||
['name' => 'Johnny Depp', 'gender' => 'male'],
|
||||
['name' => 'Al Pacino', 'gender' => 'male'],
|
||||
['name' => 'Robert De Niro', 'gender' => 'male'],
|
||||
['name' => 'Kevin Spacey', 'gender' => 'male'],
|
||||
['name' => 'Denzel Washington', 'gender' => 'male'],
|
||||
['name' => 'Russell Crowe', 'gender' => 'male'],
|
||||
['name' => 'Brad Pitt', 'gender' => 'male'],
|
||||
['name' => 'Angelina Jolie', 'gender' => 'female'],
|
||||
['name' => 'Leonardo DiCaprio', 'gender' => 'male'],
|
||||
['name' => 'Tom Cruise', 'gender' => 'male'],
|
||||
['name' => 'John Travolta', 'gender' => 'male'],
|
||||
['name' => 'Arnold Schwarzenegger', 'gender' => 'male'],
|
||||
['name' => 'Sylvester Stallone', 'gender' => 'male'],
|
||||
['name' => 'Kate Winslet', 'gender' => 'female'],
|
||||
['name' => 'Christian Bale', 'gender' => 'male'],
|
||||
['name' => 'Morgan Freeman', 'gender' => 'male'],
|
||||
['name' => 'Keanu Reeves', 'gender' => 'male'],
|
||||
['name' => 'Nicolas Cage', 'gender' => 'male'],
|
||||
['name' => 'Hugh Jackman', 'gender' => 'male'],
|
||||
['name' => 'Edward Norton', 'gender' => 'male'],
|
||||
['name' => 'Bruce Willis', 'gender' => 'male'],
|
||||
['name' => 'Tom Hanks', 'gender' => 'male'],
|
||||
['name' => 'Charlize Theron', 'gender' => 'female'],
|
||||
['name' => 'Will Smith', 'gender' => 'male'],
|
||||
['name' => 'Sean Connery', 'gender' => 'male'],
|
||||
['name' => 'Keira Knightley', 'gender' => 'female'],
|
||||
['name' => 'Vin Diesel', 'gender' => 'male'],
|
||||
['name' => 'Matt Damon', 'gender' => 'male'],
|
||||
['name' => 'Richard Gere', 'gender' => 'male'],
|
||||
['name' => 'Catherine Zeta-Jones', 'gender' => 'female']
|
||||
]);
|
||||
|
||||
return $users->random(3)->map(function ($user) {
|
||||
return [
|
||||
'name' => $user['name'],
|
||||
'gender' => $user['gender'],
|
||||
'email' => strtolower(str_replace(' ', '', $user['name']) . '@left4code.com')
|
||||
];
|
||||
});
|
||||
}
|
||||
|
||||
public function fakePhotos(): Collection
|
||||
{
|
||||
$photos = [];
|
||||
for ($i = 0; $i < 15; $i++) {
|
||||
$photos[] = 'resources/images/fakers/profile-' . rand(1, 15) . '.jpg';
|
||||
}
|
||||
return collect($photos)->random(10);
|
||||
}
|
||||
|
||||
public function fakeImages(): Collection
|
||||
{
|
||||
$photos = [];
|
||||
for ($i = 0; $i < 15; $i++) {
|
||||
$photos[] = 'resources/images/fakers/preview-' . rand(1, 15) . '.jpg';
|
||||
}
|
||||
return collect($photos)->random(10);
|
||||
}
|
||||
|
||||
public function fakeDates(): Collection
|
||||
{
|
||||
$dates = [];
|
||||
for ($i = 0; $i < 5; $i++) {
|
||||
$dates[] = date("j F Y", intval(mt_rand(1586584776897, 1672333200000) / 1000));
|
||||
}
|
||||
return collect($dates)->random(3);
|
||||
}
|
||||
|
||||
public function fakeTimes(): Collection
|
||||
{
|
||||
$times = ['01:10 PM', '05:09 AM', '06:05 AM', '03:20 PM', '04:50 AM', '07:00 PM'];
|
||||
return collect($times)->random(3);
|
||||
}
|
||||
|
||||
public function fakeFormattedTimes(): Collection
|
||||
{
|
||||
$times = collect([
|
||||
rand(10, 60) . ' seconds ago',
|
||||
rand(10, 60) . ' minutes ago',
|
||||
rand(10, 24) . ' hours ago',
|
||||
rand(10, 20) . ' days ago',
|
||||
rand(10, 12) . ' months ago'
|
||||
]);
|
||||
|
||||
return collect($times)->random(3);
|
||||
}
|
||||
|
||||
public function fakeTotals(): Collection
|
||||
{
|
||||
return collect([
|
||||
rand(20, 220),
|
||||
rand(20, 120),
|
||||
rand(20, 50)
|
||||
])->shuffle();
|
||||
}
|
||||
|
||||
public function fakeTrueFalse(): Collection
|
||||
{
|
||||
return collect([0, 1, 1])->random(1);
|
||||
}
|
||||
|
||||
public function fakeStocks(): Collection
|
||||
{
|
||||
return collect([
|
||||
rand(50, 220),
|
||||
rand(50, 120),
|
||||
rand(50, 50)
|
||||
])->shuffle();
|
||||
}
|
||||
|
||||
public function fakeProducts(): Collection
|
||||
{
|
||||
$products = collect([
|
||||
['name' => 'Dell XPS 13', 'category' => 'PC & Laptop'],
|
||||
['name' => 'Apple MacBook Pro 13', 'category' => 'PC & Laptop'],
|
||||
['name' => 'Oppo Find X2 Pro', 'category' => 'Smartphone & Tablet'],
|
||||
['name' => 'Samsung Galaxy S20 Ultra', 'category' => 'Smartphone & Tablet'],
|
||||
['name' => 'Sony Master Series A9G', 'category' => 'Electronic'],
|
||||
['name' => 'Samsung Q90 QLED TV', 'category' => 'Electronic'],
|
||||
['name' => 'Nike Air Max 270', 'category' => 'Sport & Outdoor'],
|
||||
['name' => 'Nike Tanjun', 'category' => 'Sport & Outdoor'],
|
||||
['name' => 'Nikon Z6', 'category' => 'Photography'],
|
||||
['name' => 'Sony A7 III', 'category' => 'Photography']
|
||||
]);
|
||||
|
||||
return $products->shuffle();
|
||||
}
|
||||
|
||||
public function fakeCategories(): Collection
|
||||
{
|
||||
$categories = collect([
|
||||
['name' => 'PC & Laptop', 'tags' => 'Apple, Asus, Lenovo, Dell, Acer'],
|
||||
['name' => 'Smartphone & Tablet', 'tags' => 'Samsung, Apple, Huawei, Nokia, Sony'],
|
||||
['name' => 'Electronic', 'tags' => 'Sony, LG, Toshiba, Hisense, Vizio'],
|
||||
['name' => 'Home Appliance', 'tags' => 'Whirlpool, Amana, LG, Frigidaire, Samsung'],
|
||||
['name' => 'Photography', 'tags' => 'Canon, Nikon, Sony, Fujifilm, Panasonic'],
|
||||
['name' => 'Fashion & Make Up', 'tags' => 'Nike, Adidas, Zara, H&M, Levi’s'],
|
||||
['name' => 'Kids & Baby', 'tags' => 'Mothercare, Gini & Jony, H&M, Babyhug, Liliput'],
|
||||
['name' => 'Hobby', 'tags' => 'Bandai, Atomik R/C, Atlantis Models, Carisma'],
|
||||
['name' => 'Sport & Outdoor', 'tags' => 'Nike, Adidas, Puma, Rebook, Under Armour'],
|
||||
]);
|
||||
|
||||
return $categories->shuffle()->map(function ($category) {
|
||||
return [
|
||||
'name' => $category['name'],
|
||||
'tags' => $category['tags'],
|
||||
'slug' => str_replace("&", "and", str_replace(" ", "-", strtolower($category['name']))),
|
||||
];
|
||||
});
|
||||
}
|
||||
|
||||
public function fakeNews(): Collection
|
||||
{
|
||||
$news = collect([
|
||||
[
|
||||
'title' => 'Desktop publishing software like Aldus PageMaker',
|
||||
'super_short_content' => substr('Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', 0, 30),
|
||||
'short_content' => substr('Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', 0, 150),
|
||||
'content' => 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.'
|
||||
],
|
||||
[
|
||||
'title' => 'Dummy text of the printing and typesetting industry',
|
||||
'super_short_content' => substr('It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using \'Content here, content here\', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for \'lorem ipsum\' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).', 0, 30),
|
||||
'short_content' => substr('It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using \'Content here, content here\', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for \'lorem ipsum\' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).', 0, 150),
|
||||
'content' => 'It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using \'Content here, content here\', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for \'lorem ipsum\' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).'
|
||||
],
|
||||
[
|
||||
'title' => 'Popularised in the 1960s with the release of Letraset',
|
||||
'super_short_content' => substr('Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32. The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.', 0, 30),
|
||||
'short_content' => substr('Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32. The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.', 0, 150),
|
||||
'content' => 'Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32. The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.'
|
||||
],
|
||||
[
|
||||
'title' => '200 Latin words, combined with a handful of model sentences',
|
||||
'super_short_content' => substr('There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don\'t look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn\'t anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.', 0, 50),
|
||||
'short_content' => substr('There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don\'t look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn\'t anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.', 0, 150),
|
||||
'content' => 'There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don\'t look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn\'t anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.'
|
||||
]
|
||||
]);
|
||||
|
||||
return $news->shuffle();
|
||||
}
|
||||
|
||||
public function fakeFiles(): Collection
|
||||
{
|
||||
$files = collect([
|
||||
['file_name' => 'Celine Dion - Ashes.mp4', 'type' => 'MP4', 'size' => '20 MB'],
|
||||
['file_name' => 'Laravel 7', 'type' => 'Empty Folder', 'size' => '120 MB'],
|
||||
['file_name' => $this->fakeImages()->first(), 'type' => 'Image', 'size' => '1.2 MB'],
|
||||
['file_name' => 'Repository', 'type' => 'Folder', 'size' => '20 KB'],
|
||||
['file_name' => 'Resources.txt', 'type' => 'TXT', 'size' => '2.2 MB'],
|
||||
['file_name' => 'Routes.php', 'type' => 'PHP', 'size' => '1 KB'],
|
||||
['file_name' => 'Dota 2', 'type' => 'Folder', 'size' => '112 GB'],
|
||||
['file_name' => 'Documentation', 'type' => 'Empty Folder', 'size' => '4 MB'],
|
||||
['file_name' => $this->fakeImages()->first(), 'type' => 'Image', 'size' => '1.4 MB'],
|
||||
['file_name' => $this->fakeImages()->first(), 'type' => 'Image', 'size' => '1 MB']
|
||||
]);
|
||||
|
||||
return $files->shuffle();
|
||||
}
|
||||
|
||||
public function fakeJobs(): Collection
|
||||
{
|
||||
$jobs = collect([
|
||||
'Frontend Engineer', 'Software Engineer', 'Backend Engineer', 'DevOps Engineer'
|
||||
]);
|
||||
|
||||
return $jobs->shuffle();
|
||||
}
|
||||
|
||||
public function fakeNotificationCount(): int
|
||||
{
|
||||
return rand(1, 7);
|
||||
}
|
||||
|
||||
public function fakeFoods(): Collection
|
||||
{
|
||||
$foods = collect([
|
||||
['name' => 'Vanilla Latte', 'image' => 'resources/images/fakers/food-beverage-1.jpg'],
|
||||
['name' => 'Milkshake', 'image' => 'resources/images/fakers/food-beverage-2.jpg'],
|
||||
['name' => 'Soft Drink', 'image' => 'resources/images/fakers/food-beverage-3.jpg'],
|
||||
['name' => 'Root Beer', 'image' => 'resources/images/fakers/food-beverage-4.jpg'],
|
||||
['name' => 'Pocari', 'image' => 'resources/images/fakers/food-beverage-5.jpg'],
|
||||
['name' => 'Ultimate Burger', 'image' => 'resources/images/fakers/food-beverage-6.jpg'],
|
||||
['name' => 'Hotdog', 'image' => 'resources/images/fakers/food-beverage-7.jpg'],
|
||||
['name' => 'Avocado Burger', 'image' => 'resources/images/fakers/food-beverage-8.jpg'],
|
||||
['name' => 'Spaghetti Fettucine Aglio with Beef Bacon', 'image' => 'resources/images/fakers/food-beverage-9.jpg'],
|
||||
['name' => 'Spaghetti Fettucine Aglio with Smoked Salmon', 'image' => 'resources/images/fakers/food-beverage-10.jpg'],
|
||||
['name' => 'Curry Penne and Cheese', 'image' => 'resources/images/fakers/food-beverage-11.jpg'],
|
||||
['name' => 'French Fries', 'image' => 'resources/images/fakers/food-beverage-12.jpg'],
|
||||
['name' => 'Virginia Cheese Fries', 'image' => 'resources/images/fakers/food-beverage-13.jpg'],
|
||||
['name' => 'Virginia Cheese Wedges', 'image' => 'resources/images/fakers/food-beverage-14.jpg'],
|
||||
['name' => 'Fried/Grilled Banana', 'image' => 'resources/images/fakers/food-beverage-15.jpg'],
|
||||
['name' => 'Crispy Mushroom', 'image' => 'resources/images/fakers/food-beverage-16.jpg'],
|
||||
['name' => 'Fried Calamari', 'image' => 'resources/images/fakers/food-beverage-17.jpg'],
|
||||
['name' => 'Chicken Wings', 'image' => 'resources/images/fakers/food-beverage-18.jpg'],
|
||||
['name' => 'Snack Platter', 'image' => 'resources/images/fakers/food-beverage-19.jpg']
|
||||
]);
|
||||
|
||||
return $foods->shuffle();
|
||||
}
|
||||
|
||||
/**
|
||||
* Bind data to the view.
|
||||
*
|
||||
* @param View $view
|
||||
* @return void
|
||||
*/
|
||||
public function compose(View $view): void
|
||||
{
|
||||
$fakerData = [];
|
||||
for ($i = 0; $i < 20; $i++) {
|
||||
$fakerData[] = [
|
||||
'users' => $this->fakeUsers(),
|
||||
'photos' => $this->fakePhotos(),
|
||||
'images' => $this->fakeImages(),
|
||||
'dates' => $this->fakeDates(),
|
||||
'times' => $this->fakeTimes(),
|
||||
'formatted_times' => $this->fakeFormattedTimes(),
|
||||
'totals' => $this->fakeTotals(),
|
||||
'true_false' => $this->fakeTrueFalse(),
|
||||
'stocks' => $this->fakeStocks(),
|
||||
'products' => $this->fakeProducts(),
|
||||
'categories' => $this->fakeCategories(),
|
||||
'news' => $this->fakeNews(),
|
||||
'files' => $this->fakeFiles(),
|
||||
'jobs' => $this->fakeJobs(),
|
||||
'notification_count' => $this->fakeNotificationCount(),
|
||||
'foods' => $this->fakeFoods()
|
||||
];
|
||||
}
|
||||
|
||||
$view->with('fakers', $fakerData);
|
||||
}
|
||||
}
|
16
app/View/Composers/LoggedInUserComposer.php
Normal file
16
app/View/Composers/LoggedInUserComposer.php
Normal file
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
namespace App\View\Composers;
|
||||
|
||||
use Illuminate\View\View;
|
||||
|
||||
class LoggedInUserComposer
|
||||
{
|
||||
/**
|
||||
* Bind loggedin user value to the view.
|
||||
*/
|
||||
public function compose(View $view): void
|
||||
{
|
||||
$view->with('loggedinUser', request()->user());
|
||||
}
|
||||
}
|
140
app/View/Composers/MenuComposer.php
Normal file
140
app/View/Composers/MenuComposer.php
Normal file
|
@ -0,0 +1,140 @@
|
|||
<?php
|
||||
|
||||
namespace App\View\Composers;
|
||||
|
||||
use Illuminate\View\View;
|
||||
use App\Main\TopMenu;
|
||||
use App\Main\SideMenu;
|
||||
use App\Main\SimpleMenu;
|
||||
|
||||
class MenuComposer
|
||||
{
|
||||
/**
|
||||
* Bind menu to the view.
|
||||
*/
|
||||
public function compose(View $view): void
|
||||
{
|
||||
if (!is_null(request()->route())) {
|
||||
$pageName = request()->route()->getName();
|
||||
$layout = $this->layout($view);
|
||||
$activeMenu = $this->activeMenu($pageName, $layout);
|
||||
|
||||
$view->with('topMenu', TopMenu::menu());
|
||||
$view->with('sideMenu', SideMenu::menu());
|
||||
$view->with('simpleMenu', SimpleMenu::menu());
|
||||
$view->with('firstLevelActiveIndex', $activeMenu['first_level_active_index']);
|
||||
$view->with('secondLevelActiveIndex', $activeMenu['second_level_active_index']);
|
||||
$view->with('thirdLevelActiveIndex', $activeMenu['third_level_active_index']);
|
||||
$view->with('pageName', $pageName);
|
||||
$view->with('layout', $layout);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify used layout.
|
||||
*/
|
||||
public function layout($view): string
|
||||
{
|
||||
if (isset($view->layout)) {
|
||||
return $view->layout;
|
||||
} else if (request()->has('layout')) {
|
||||
return request()->query('layout');
|
||||
}
|
||||
|
||||
return 'side-menu';
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine active menu & submenu.
|
||||
*/
|
||||
public function activeMenu($pageName, $layout): array
|
||||
{
|
||||
$firstLevelActiveIndex = '';
|
||||
$secondLevelActiveIndex = '';
|
||||
$thirdLevelActiveIndex = '';
|
||||
|
||||
|
||||
if ($layout == 'top-menu') {
|
||||
foreach (TopMenu::menu() as $menuKey => $menu) {
|
||||
if (isset($menu['route_name']) && $menu['route_name'] == $pageName && empty($firstPageName)) {
|
||||
$firstLevelActiveIndex = $menuKey;
|
||||
}
|
||||
|
||||
if (isset($menu['sub_menu'])) {
|
||||
foreach ($menu['sub_menu'] as $subMenuKey => $subMenu) {
|
||||
if (isset($subMenu['route_name']) && $subMenu['route_name'] == $pageName && $menuKey != 'menu-layout' && empty($secondPageName)) {
|
||||
$firstLevelActiveIndex = $menuKey;
|
||||
$secondLevelActiveIndex = $subMenuKey;
|
||||
}
|
||||
|
||||
if (isset($subMenu['sub_menu'])) {
|
||||
foreach ($subMenu['sub_menu'] as $lastSubMenuKey => $lastSubMenu) {
|
||||
if (isset($lastSubMenu['route_name']) && $lastSubMenu['route_name'] == $pageName) {
|
||||
$firstLevelActiveIndex = $menuKey;
|
||||
$secondLevelActiveIndex = $subMenuKey;
|
||||
$thirdLevelActiveIndex = $lastSubMenuKey;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if ($layout == 'simple-menu') {
|
||||
foreach (SimpleMenu::menu() as $menuKey => $menu) {
|
||||
if ($menu !== 'divider' && isset($menu['route_name']) && $menu['route_name'] == $pageName && empty($firstPageName)) {
|
||||
$firstLevelActiveIndex = $menuKey;
|
||||
}
|
||||
|
||||
if (isset($menu['sub_menu'])) {
|
||||
foreach ($menu['sub_menu'] as $subMenuKey => $subMenu) {
|
||||
if (isset($subMenu['route_name']) && $subMenu['route_name'] == $pageName && $menuKey != 'menu-layout' && empty($secondPageName)) {
|
||||
$firstLevelActiveIndex = $menuKey;
|
||||
$secondLevelActiveIndex = $subMenuKey;
|
||||
}
|
||||
|
||||
if (isset($subMenu['sub_menu'])) {
|
||||
foreach ($subMenu['sub_menu'] as $lastSubMenuKey => $lastSubMenu) {
|
||||
if (isset($lastSubMenu['route_name']) && $lastSubMenu['route_name'] == $pageName) {
|
||||
$firstLevelActiveIndex = $menuKey;
|
||||
$secondLevelActiveIndex = $subMenuKey;
|
||||
$thirdLevelActiveIndex = $lastSubMenuKey;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
foreach (SideMenu::menu() as $menuKey => $menu) {
|
||||
if ($menu !== 'divider' && isset($menu['route_name']) && $menu['route_name'] == $pageName && empty($firstPageName)) {
|
||||
$firstLevelActiveIndex = $menuKey;
|
||||
}
|
||||
|
||||
if (isset($menu['sub_menu'])) {
|
||||
foreach ($menu['sub_menu'] as $subMenuKey => $subMenu) {
|
||||
if (isset($subMenu['route_name']) && $subMenu['route_name'] == $pageName && $menuKey != 'menu-layout' && empty($secondPageName)) {
|
||||
$firstLevelActiveIndex = $menuKey;
|
||||
$secondLevelActiveIndex = $subMenuKey;
|
||||
}
|
||||
|
||||
if (isset($subMenu['sub_menu'])) {
|
||||
foreach ($subMenu['sub_menu'] as $lastSubMenuKey => $lastSubMenu) {
|
||||
if (isset($lastSubMenu['route_name']) && $lastSubMenu['route_name'] == $pageName) {
|
||||
$firstLevelActiveIndex = $menuKey;
|
||||
$secondLevelActiveIndex = $subMenuKey;
|
||||
$thirdLevelActiveIndex = $lastSubMenuKey;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return [
|
||||
'first_level_active_index' => $firstLevelActiveIndex,
|
||||
'second_level_active_index' => $secondLevelActiveIndex,
|
||||
'third_level_active_index' => $thirdLevelActiveIndex
|
||||
];
|
||||
}
|
||||
}
|
53
artisan
Executable file
53
artisan
Executable file
|
@ -0,0 +1,53 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
define('LARAVEL_START', microtime(true));
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Register The Auto Loader
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Composer provides a convenient, automatically generated class loader
|
||||
| for our application. We just need to utilize it! We'll require it
|
||||
| into the script here so that we do not have to worry about the
|
||||
| loading of any of our classes manually. It's great to relax.
|
||||
|
|
||||
*/
|
||||
|
||||
require __DIR__.'/vendor/autoload.php';
|
||||
|
||||
$app = require_once __DIR__.'/bootstrap/app.php';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Run The Artisan Application
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When we run the console application, the current CLI command will be
|
||||
| executed in this console and the response sent back to a terminal
|
||||
| or another output device for the developers. Here goes nothing!
|
||||
|
|
||||
*/
|
||||
|
||||
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
|
||||
|
||||
$status = $kernel->handle(
|
||||
$input = new Symfony\Component\Console\Input\ArgvInput,
|
||||
new Symfony\Component\Console\Output\ConsoleOutput
|
||||
);
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Shutdown The Application
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Once Artisan has finished running, we will fire off the shutdown events
|
||||
| so that any final work may be done by the application before we shut
|
||||
| down the process. This is the last thing to happen to the request.
|
||||
|
|
||||
*/
|
||||
|
||||
$kernel->terminate($input, $status);
|
||||
|
||||
exit($status);
|
55
bootstrap/app.php
Normal file
55
bootstrap/app.php
Normal file
|
@ -0,0 +1,55 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Create The Application
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The first thing we will do is create a new Laravel application instance
|
||||
| which serves as the "glue" for all the components of Laravel, and is
|
||||
| the IoC container for the system binding all of the various parts.
|
||||
|
|
||||
*/
|
||||
|
||||
$app = new Illuminate\Foundation\Application(
|
||||
$_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)
|
||||
);
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Bind Important Interfaces
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Next, we need to bind some important interfaces into the container so
|
||||
| we will be able to resolve them when needed. The kernels serve the
|
||||
| incoming requests to this application from both the web and CLI.
|
||||
|
|
||||
*/
|
||||
|
||||
$app->singleton(
|
||||
Illuminate\Contracts\Http\Kernel::class,
|
||||
App\Http\Kernel::class
|
||||
);
|
||||
|
||||
$app->singleton(
|
||||
Illuminate\Contracts\Console\Kernel::class,
|
||||
App\Console\Kernel::class
|
||||
);
|
||||
|
||||
$app->singleton(
|
||||
Illuminate\Contracts\Debug\ExceptionHandler::class,
|
||||
App\Exceptions\Handler::class
|
||||
);
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Return The Application
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This script returns the application instance. The instance is given to
|
||||
| the calling script so we can separate the building of the instances
|
||||
| from the actual running of the application and sending responses.
|
||||
|
|
||||
*/
|
||||
|
||||
return $app;
|
2
bootstrap/cache/.gitignore
vendored
Normal file
2
bootstrap/cache/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
*
|
||||
!.gitignore
|
72
composer.json
Normal file
72
composer.json
Normal file
|
@ -0,0 +1,72 @@
|
|||
{
|
||||
"name": "laravel/laravel",
|
||||
"type": "project",
|
||||
"description": "The Laravel Framework.",
|
||||
"keywords": [
|
||||
"framework",
|
||||
"laravel"
|
||||
],
|
||||
"license": "MIT",
|
||||
"require": {
|
||||
"php": "^8.1",
|
||||
"guzzlehttp/guzzle": "^7.2",
|
||||
"laravel/framework": "^10.8",
|
||||
"laravel/sanctum": "^3.2",
|
||||
"laravel/tinker": "^2.8"
|
||||
},
|
||||
"require-dev": {
|
||||
"fakerphp/faker": "^1.9.1",
|
||||
"laravel/pint": "^1.0",
|
||||
"laravel/sail": "^1.18",
|
||||
"mockery/mockery": "^1.4.4",
|
||||
"nunomaduro/collision": "^7.0",
|
||||
"phpunit/phpunit": "^10.1",
|
||||
"spatie/laravel-ignition": "^2.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"App\\": "app/",
|
||||
"Database\\Factories\\": "database/factories/",
|
||||
"Database\\Seeders\\": "database/seeders/"
|
||||
},
|
||||
"files": [
|
||||
"app/Http/Helpers.php"
|
||||
]
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"Tests\\": "tests/"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"post-autoload-dump": [
|
||||
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
|
||||
"@php artisan package:discover --ansi"
|
||||
],
|
||||
"post-update-cmd": [
|
||||
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
|
||||
],
|
||||
"post-root-package-install": [
|
||||
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
|
||||
],
|
||||
"post-create-project-cmd": [
|
||||
"@php artisan key:generate --ansi"
|
||||
]
|
||||
},
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"dont-discover": []
|
||||
}
|
||||
},
|
||||
"config": {
|
||||
"optimize-autoloader": true,
|
||||
"preferred-install": "dist",
|
||||
"sort-packages": true,
|
||||
"allow-plugins": {
|
||||
"pestphp/pest-plugin": true,
|
||||
"php-http/discovery": true
|
||||
}
|
||||
},
|
||||
"minimum-stability": "stable",
|
||||
"prefer-stable": true
|
||||
}
|
8081
composer.lock
generated
Normal file
8081
composer.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
189
config/app.php
Normal file
189
config/app.php
Normal file
|
@ -0,0 +1,189 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Facade;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This value is the name of your application. This value is used when the
|
||||
| framework needs to place the application's name in a notification or
|
||||
| any other location as required by the application or its packages.
|
||||
|
|
||||
*/
|
||||
|
||||
'name' => env('APP_NAME', 'Laravel'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Environment
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This value determines the "environment" your application is currently
|
||||
| running in. This may determine how you prefer to configure various
|
||||
| services the application utilizes. Set this in your ".env" file.
|
||||
|
|
||||
*/
|
||||
|
||||
'env' => env('APP_ENV', 'production'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Debug Mode
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When your application is in debug mode, detailed error messages with
|
||||
| stack traces will be shown on every error that occurs within your
|
||||
| application. If disabled, a simple generic error page is shown.
|
||||
|
|
||||
*/
|
||||
|
||||
'debug' => (bool) env('APP_DEBUG', false),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application URL
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This URL is used by the console to properly generate URLs when using
|
||||
| the Artisan command line tool. You should set this to the root of
|
||||
| your application so that it is used when running Artisan tasks.
|
||||
|
|
||||
*/
|
||||
|
||||
'url' => env('APP_URL', 'http://localhost'),
|
||||
|
||||
'asset_url' => env('ASSET_URL'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Timezone
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the default timezone for your application, which
|
||||
| will be used by the PHP date and date-time functions. We have gone
|
||||
| ahead and set this to a sensible default for you out of the box.
|
||||
|
|
||||
*/
|
||||
|
||||
'timezone' => 'UTC',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Locale Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The application locale determines the default locale that will be used
|
||||
| by the translation service provider. You are free to set this value
|
||||
| to any of the locales which will be supported by the application.
|
||||
|
|
||||
*/
|
||||
|
||||
'locale' => 'en',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Fallback Locale
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The fallback locale determines the locale to use when the current one
|
||||
| is not available. You may change the value to correspond to any of
|
||||
| the language folders that are provided through your application.
|
||||
|
|
||||
*/
|
||||
|
||||
'fallback_locale' => 'en',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Faker Locale
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This locale will be used by the Faker PHP library when generating fake
|
||||
| data for your database seeds. For example, this will be used to get
|
||||
| localized telephone numbers, street address information and more.
|
||||
|
|
||||
*/
|
||||
|
||||
'faker_locale' => 'en_US',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Encryption Key
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This key is used by the Illuminate encrypter service and should be set
|
||||
| to a random, 32 character string, otherwise these encrypted strings
|
||||
| will not be safe. Please do this before deploying an application!
|
||||
|
|
||||
*/
|
||||
|
||||
'key' => env('APP_KEY'),
|
||||
|
||||
'cipher' => 'AES-256-CBC',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Maintenance Mode Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These configuration options determine the driver used to determine and
|
||||
| manage Laravel's "maintenance mode" status. The "cache" driver will
|
||||
| allow maintenance mode to be controlled across multiple machines.
|
||||
|
|
||||
| Supported drivers: "file", "cache"
|
||||
|
|
||||
*/
|
||||
|
||||
'maintenance' => [
|
||||
'driver' => 'file',
|
||||
// 'store' => 'redis',
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Autoloaded Service Providers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The service providers listed here will be automatically loaded on the
|
||||
| request to your application. Feel free to add your own services to
|
||||
| this array to grant expanded functionality to your applications.
|
||||
|
|
||||
*/
|
||||
|
||||
'providers' => ServiceProvider::defaultProviders()->merge([
|
||||
/*
|
||||
* Package Service Providers...
|
||||
*/
|
||||
|
||||
/*
|
||||
* Application Service Providers...
|
||||
*/
|
||||
App\Providers\AppServiceProvider::class,
|
||||
App\Providers\AuthServiceProvider::class,
|
||||
// App\Providers\BroadcastServiceProvider::class,
|
||||
App\Providers\EventServiceProvider::class,
|
||||
App\Providers\RouteServiceProvider::class,
|
||||
App\Providers\ViewServiceProvider::class,
|
||||
])->toArray(),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Class Aliases
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This array of class aliases will be registered when this application
|
||||
| is started. However, feel free to register as many as you wish as
|
||||
| the aliases are "lazy" loaded so they don't hinder performance.
|
||||
|
|
||||
*/
|
||||
|
||||
'aliases' => Facade::defaultAliases()->merge([
|
||||
// 'Example' => App\Facades\Example::class,
|
||||
])->toArray(),
|
||||
|
||||
];
|
115
config/auth.php
Normal file
115
config/auth.php
Normal file
|
@ -0,0 +1,115 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Authentication Defaults
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default authentication "guard" and password
|
||||
| reset options for your application. You may change these defaults
|
||||
| as required, but they're a perfect start for most applications.
|
||||
|
|
||||
*/
|
||||
|
||||
'defaults' => [
|
||||
'guard' => 'web',
|
||||
'passwords' => 'users',
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Authentication Guards
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Next, you may define every authentication guard for your application.
|
||||
| Of course, a great default configuration has been defined for you
|
||||
| here which uses session storage and the Eloquent user provider.
|
||||
|
|
||||
| All authentication drivers have a user provider. This defines how the
|
||||
| users are actually retrieved out of your database or other storage
|
||||
| mechanisms used by this application to persist your user's data.
|
||||
|
|
||||
| Supported: "session"
|
||||
|
|
||||
*/
|
||||
|
||||
'guards' => [
|
||||
'web' => [
|
||||
'driver' => 'session',
|
||||
'provider' => 'users',
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| User Providers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| All authentication drivers have a user provider. This defines how the
|
||||
| users are actually retrieved out of your database or other storage
|
||||
| mechanisms used by this application to persist your user's data.
|
||||
|
|
||||
| If you have multiple user tables or models you may configure multiple
|
||||
| sources which represent each model / table. These sources may then
|
||||
| be assigned to any extra authentication guards you have defined.
|
||||
|
|
||||
| Supported: "database", "eloquent"
|
||||
|
|
||||
*/
|
||||
|
||||
'providers' => [
|
||||
'users' => [
|
||||
'driver' => 'eloquent',
|
||||
'model' => App\Models\User::class,
|
||||
],
|
||||
|
||||
// 'users' => [
|
||||
// 'driver' => 'database',
|
||||
// 'table' => 'users',
|
||||
// ],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Resetting Passwords
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You may specify multiple password reset configurations if you have more
|
||||
| than one user table or model in the application and you want to have
|
||||
| separate password reset settings based on the specific user types.
|
||||
|
|
||||
| The expiry time is the number of minutes that each reset token will be
|
||||
| considered valid. This security feature keeps tokens short-lived so
|
||||
| they have less time to be guessed. You may change this as needed.
|
||||
|
|
||||
| The throttle setting is the number of seconds a user must wait before
|
||||
| generating more password reset tokens. This prevents the user from
|
||||
| quickly generating a very large amount of password reset tokens.
|
||||
|
|
||||
*/
|
||||
|
||||
'passwords' => [
|
||||
'users' => [
|
||||
'provider' => 'users',
|
||||
'table' => 'password_reset_tokens',
|
||||
'expire' => 60,
|
||||
'throttle' => 60,
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Password Confirmation Timeout
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may define the amount of seconds before a password confirmation
|
||||
| times out and the user is prompted to re-enter their password via the
|
||||
| confirmation screen. By default, the timeout lasts for three hours.
|
||||
|
|
||||
*/
|
||||
|
||||
'password_timeout' => 10800,
|
||||
|
||||
];
|
70
config/broadcasting.php
Normal file
70
config/broadcasting.php
Normal file
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Broadcaster
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default broadcaster that will be used by the
|
||||
| framework when an event needs to be broadcast. You may set this to
|
||||
| any of the connections defined in the "connections" array below.
|
||||
|
|
||||
| Supported: "pusher", "ably", "redis", "log", "null"
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('BROADCAST_DRIVER', 'null'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Broadcast Connections
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may define all of the broadcast connections that will be used
|
||||
| to broadcast events to other systems or over websockets. Samples of
|
||||
| each available type of connection are provided inside this array.
|
||||
|
|
||||
*/
|
||||
|
||||
'connections' => [
|
||||
|
||||
'pusher' => [
|
||||
'driver' => 'pusher',
|
||||
'key' => env('PUSHER_APP_KEY'),
|
||||
'secret' => env('PUSHER_APP_SECRET'),
|
||||
'app_id' => env('PUSHER_APP_ID'),
|
||||
'options' => [
|
||||
'host' => env('PUSHER_HOST') ?: 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com',
|
||||
'port' => env('PUSHER_PORT', 443),
|
||||
'scheme' => env('PUSHER_SCHEME', 'https'),
|
||||
'encrypted' => true,
|
||||
'useTLS' => env('PUSHER_SCHEME', 'https') === 'https',
|
||||
],
|
||||
'client_options' => [
|
||||
// Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html
|
||||
],
|
||||
],
|
||||
|
||||
'ably' => [
|
||||
'driver' => 'ably',
|
||||
'key' => env('ABLY_KEY'),
|
||||
],
|
||||
|
||||
'redis' => [
|
||||
'driver' => 'redis',
|
||||
'connection' => 'default',
|
||||
],
|
||||
|
||||
'log' => [
|
||||
'driver' => 'log',
|
||||
],
|
||||
|
||||
'null' => [
|
||||
'driver' => 'null',
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
];
|
110
config/cache.php
Normal file
110
config/cache.php
Normal file
|
@ -0,0 +1,110 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Cache Store
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default cache connection that gets used while
|
||||
| using this caching library. This connection is used when another is
|
||||
| not explicitly specified when executing a given caching function.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('CACHE_DRIVER', 'file'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Stores
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may define all of the cache "stores" for your application as
|
||||
| well as their drivers. You may even define multiple stores for the
|
||||
| same cache driver to group types of items stored in your caches.
|
||||
|
|
||||
| Supported drivers: "apc", "array", "database", "file",
|
||||
| "memcached", "redis", "dynamodb", "octane", "null"
|
||||
|
|
||||
*/
|
||||
|
||||
'stores' => [
|
||||
|
||||
'apc' => [
|
||||
'driver' => 'apc',
|
||||
],
|
||||
|
||||
'array' => [
|
||||
'driver' => 'array',
|
||||
'serialize' => false,
|
||||
],
|
||||
|
||||
'database' => [
|
||||
'driver' => 'database',
|
||||
'table' => 'cache',
|
||||
'connection' => null,
|
||||
'lock_connection' => null,
|
||||
],
|
||||
|
||||
'file' => [
|
||||
'driver' => 'file',
|
||||
'path' => storage_path('framework/cache/data'),
|
||||
],
|
||||
|
||||
'memcached' => [
|
||||
'driver' => 'memcached',
|
||||
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
|
||||
'sasl' => [
|
||||
env('MEMCACHED_USERNAME'),
|
||||
env('MEMCACHED_PASSWORD'),
|
||||
],
|
||||
'options' => [
|
||||
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
|
||||
],
|
||||
'servers' => [
|
||||
[
|
||||
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
|
||||
'port' => env('MEMCACHED_PORT', 11211),
|
||||
'weight' => 100,
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
'redis' => [
|
||||
'driver' => 'redis',
|
||||
'connection' => 'cache',
|
||||
'lock_connection' => 'default',
|
||||
],
|
||||
|
||||
'dynamodb' => [
|
||||
'driver' => 'dynamodb',
|
||||
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
|
||||
'endpoint' => env('DYNAMODB_ENDPOINT'),
|
||||
],
|
||||
|
||||
'octane' => [
|
||||
'driver' => 'octane',
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Key Prefix
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When utilizing the APC, database, memcached, Redis, or DynamoDB cache
|
||||
| stores there might be other applications using the same cache. For
|
||||
| that reason, you may prefix every cache key to avoid collisions.
|
||||
|
|
||||
*/
|
||||
|
||||
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'),
|
||||
|
||||
];
|
34
config/cors.php
Normal file
34
config/cors.php
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cross-Origin Resource Sharing (CORS) Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure your settings for cross-origin resource sharing
|
||||
| or "CORS". This determines what cross-origin operations may execute
|
||||
| in web browsers. You are free to adjust these settings as needed.
|
||||
|
|
||||
| To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
|
||||
|
|
||||
*/
|
||||
|
||||
'paths' => ['api/*', 'sanctum/csrf-cookie'],
|
||||
|
||||
'allowed_methods' => ['*'],
|
||||
|
||||
'allowed_origins' => ['*'],
|
||||
|
||||
'allowed_origins_patterns' => [],
|
||||
|
||||
'allowed_headers' => ['*'],
|
||||
|
||||
'exposed_headers' => [],
|
||||
|
||||
'max_age' => 0,
|
||||
|
||||
'supports_credentials' => false,
|
||||
|
||||
];
|
151
config/database.php
Normal file
151
config/database.php
Normal file
|
@ -0,0 +1,151 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Database Connection Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify which of the database connections below you wish
|
||||
| to use as your default connection for all database work. Of course
|
||||
| you may use many connections at once using the Database library.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('DB_CONNECTION', 'mysql'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Database Connections
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here are each of the database connections setup for your application.
|
||||
| Of course, examples of configuring each database platform that is
|
||||
| supported by Laravel is shown below to make development simple.
|
||||
|
|
||||
|
|
||||
| All database work in Laravel is done through the PHP PDO facilities
|
||||
| so make sure you have the driver for your particular database of
|
||||
| choice installed on your machine before you begin development.
|
||||
|
|
||||
*/
|
||||
|
||||
'connections' => [
|
||||
|
||||
'sqlite' => [
|
||||
'driver' => 'sqlite',
|
||||
'url' => env('DATABASE_URL'),
|
||||
'database' => env('DB_DATABASE', database_path('database.sqlite')),
|
||||
'prefix' => '',
|
||||
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
|
||||
],
|
||||
|
||||
'mysql' => [
|
||||
'driver' => 'mysql',
|
||||
'url' => env('DATABASE_URL'),
|
||||
'host' => env('DB_HOST', '127.0.0.1'),
|
||||
'port' => env('DB_PORT', '3306'),
|
||||
'database' => env('DB_DATABASE', 'forge'),
|
||||
'username' => env('DB_USERNAME', 'forge'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'unix_socket' => env('DB_SOCKET', ''),
|
||||
'charset' => 'utf8mb4',
|
||||
'collation' => 'utf8mb4_unicode_ci',
|
||||
'prefix' => '',
|
||||
'prefix_indexes' => true,
|
||||
'strict' => true,
|
||||
'engine' => null,
|
||||
'options' => extension_loaded('pdo_mysql') ? array_filter([
|
||||
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
|
||||
]) : [],
|
||||
],
|
||||
|
||||
'pgsql' => [
|
||||
'driver' => 'pgsql',
|
||||
'url' => env('DATABASE_URL'),
|
||||
'host' => env('DB_HOST', '127.0.0.1'),
|
||||
'port' => env('DB_PORT', '5432'),
|
||||
'database' => env('DB_DATABASE', 'forge'),
|
||||
'username' => env('DB_USERNAME', 'forge'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'charset' => 'utf8',
|
||||
'prefix' => '',
|
||||
'prefix_indexes' => true,
|
||||
'search_path' => 'public',
|
||||
'sslmode' => 'prefer',
|
||||
],
|
||||
|
||||
'sqlsrv' => [
|
||||
'driver' => 'sqlsrv',
|
||||
'url' => env('DATABASE_URL'),
|
||||
'host' => env('DB_HOST', 'localhost'),
|
||||
'port' => env('DB_PORT', '1433'),
|
||||
'database' => env('DB_DATABASE', 'forge'),
|
||||
'username' => env('DB_USERNAME', 'forge'),
|
||||
'password' => env('DB_PASSWORD', ''),
|
||||
'charset' => 'utf8',
|
||||
'prefix' => '',
|
||||
'prefix_indexes' => true,
|
||||
// 'encrypt' => env('DB_ENCRYPT', 'yes'),
|
||||
// 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'),
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Migration Repository Table
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This table keeps track of all the migrations that have already run for
|
||||
| your application. Using this information, we can determine which of
|
||||
| the migrations on disk haven't actually been run in the database.
|
||||
|
|
||||
*/
|
||||
|
||||
'migrations' => 'migrations',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Redis Databases
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Redis is an open source, fast, and advanced key-value store that also
|
||||
| provides a richer body of commands than a typical key-value system
|
||||
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
||||
|
|
||||
*/
|
||||
|
||||
'redis' => [
|
||||
|
||||
'client' => env('REDIS_CLIENT', 'phpredis'),
|
||||
|
||||
'options' => [
|
||||
'cluster' => env('REDIS_CLUSTER', 'redis'),
|
||||
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
|
||||
],
|
||||
|
||||
'default' => [
|
||||
'url' => env('REDIS_URL'),
|
||||
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||
'username' => env('REDIS_USERNAME'),
|
||||
'password' => env('REDIS_PASSWORD'),
|
||||
'port' => env('REDIS_PORT', '6379'),
|
||||
'database' => env('REDIS_DB', '0'),
|
||||
],
|
||||
|
||||
'cache' => [
|
||||
'url' => env('REDIS_URL'),
|
||||
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||
'username' => env('REDIS_USERNAME'),
|
||||
'password' => env('REDIS_PASSWORD'),
|
||||
'port' => env('REDIS_PORT', '6379'),
|
||||
'database' => env('REDIS_CACHE_DB', '1'),
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
];
|
76
config/filesystems.php
Normal file
76
config/filesystems.php
Normal file
|
@ -0,0 +1,76 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Filesystem Disk
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the default filesystem disk that should be used
|
||||
| by the framework. The "local" disk, as well as a variety of cloud
|
||||
| based disks are available to your application. Just store away!
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('FILESYSTEM_DISK', 'local'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Filesystem Disks
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure as many filesystem "disks" as you wish, and you
|
||||
| may even configure multiple disks of the same driver. Defaults have
|
||||
| been set up for each driver as an example of the required values.
|
||||
|
|
||||
| Supported Drivers: "local", "ftp", "sftp", "s3"
|
||||
|
|
||||
*/
|
||||
|
||||
'disks' => [
|
||||
|
||||
'local' => [
|
||||
'driver' => 'local',
|
||||
'root' => storage_path('app'),
|
||||
'throw' => false,
|
||||
],
|
||||
|
||||
'public' => [
|
||||
'driver' => 'local',
|
||||
'root' => storage_path('app/public'),
|
||||
'url' => env('APP_URL').'/storage',
|
||||
'visibility' => 'public',
|
||||
'throw' => false,
|
||||
],
|
||||
|
||||
's3' => [
|
||||
'driver' => 's3',
|
||||
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||
'region' => env('AWS_DEFAULT_REGION'),
|
||||
'bucket' => env('AWS_BUCKET'),
|
||||
'url' => env('AWS_URL'),
|
||||
'endpoint' => env('AWS_ENDPOINT'),
|
||||
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
|
||||
'throw' => false,
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Symbolic Links
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure the symbolic links that will be created when the
|
||||
| `storage:link` Artisan command is executed. The array keys should be
|
||||
| the locations of the links and the values should be their targets.
|
||||
|
|
||||
*/
|
||||
|
||||
'links' => [
|
||||
public_path('storage') => storage_path('app/public'),
|
||||
],
|
||||
|
||||
];
|
52
config/hashing.php
Normal file
52
config/hashing.php
Normal file
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Hash Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default hash driver that will be used to hash
|
||||
| passwords for your application. By default, the bcrypt algorithm is
|
||||
| used; however, you remain free to modify this option if you wish.
|
||||
|
|
||||
| Supported: "bcrypt", "argon", "argon2id"
|
||||
|
|
||||
*/
|
||||
|
||||
'driver' => 'bcrypt',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Bcrypt Options
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the configuration options that should be used when
|
||||
| passwords are hashed using the Bcrypt algorithm. This will allow you
|
||||
| to control the amount of time it takes to hash the given password.
|
||||
|
|
||||
*/
|
||||
|
||||
'bcrypt' => [
|
||||
'rounds' => env('BCRYPT_ROUNDS', 10),
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Argon Options
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the configuration options that should be used when
|
||||
| passwords are hashed using the Argon algorithm. These will allow you
|
||||
| to control the amount of time it takes to hash the given password.
|
||||
|
|
||||
*/
|
||||
|
||||
'argon' => [
|
||||
'memory' => 65536,
|
||||
'threads' => 1,
|
||||
'time' => 4,
|
||||
],
|
||||
|
||||
];
|
131
config/logging.php
Normal file
131
config/logging.php
Normal file
|
@ -0,0 +1,131 @@
|
|||
<?php
|
||||
|
||||
use Monolog\Handler\NullHandler;
|
||||
use Monolog\Handler\StreamHandler;
|
||||
use Monolog\Handler\SyslogUdpHandler;
|
||||
use Monolog\Processor\PsrLogMessageProcessor;
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Log Channel
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option defines the default log channel that gets used when writing
|
||||
| messages to the logs. The name specified in this option should match
|
||||
| one of the channels defined in the "channels" configuration array.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('LOG_CHANNEL', 'stack'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Deprecations Log Channel
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the log channel that should be used to log warnings
|
||||
| regarding deprecated PHP and library features. This allows you to get
|
||||
| your application ready for upcoming major versions of dependencies.
|
||||
|
|
||||
*/
|
||||
|
||||
'deprecations' => [
|
||||
'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
|
||||
'trace' => false,
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Log Channels
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure the log channels for your application. Out of
|
||||
| the box, Laravel uses the Monolog PHP logging library. This gives
|
||||
| you a variety of powerful log handlers / formatters to utilize.
|
||||
|
|
||||
| Available Drivers: "single", "daily", "slack", "syslog",
|
||||
| "errorlog", "monolog",
|
||||
| "custom", "stack"
|
||||
|
|
||||
*/
|
||||
|
||||
'channels' => [
|
||||
'stack' => [
|
||||
'driver' => 'stack',
|
||||
'channels' => ['single'],
|
||||
'ignore_exceptions' => false,
|
||||
],
|
||||
|
||||
'single' => [
|
||||
'driver' => 'single',
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'replace_placeholders' => true,
|
||||
],
|
||||
|
||||
'daily' => [
|
||||
'driver' => 'daily',
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'days' => 14,
|
||||
'replace_placeholders' => true,
|
||||
],
|
||||
|
||||
'slack' => [
|
||||
'driver' => 'slack',
|
||||
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
||||
'username' => 'Laravel Log',
|
||||
'emoji' => ':boom:',
|
||||
'level' => env('LOG_LEVEL', 'critical'),
|
||||
'replace_placeholders' => true,
|
||||
],
|
||||
|
||||
'papertrail' => [
|
||||
'driver' => 'monolog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class),
|
||||
'handler_with' => [
|
||||
'host' => env('PAPERTRAIL_URL'),
|
||||
'port' => env('PAPERTRAIL_PORT'),
|
||||
'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'),
|
||||
],
|
||||
'processors' => [PsrLogMessageProcessor::class],
|
||||
],
|
||||
|
||||
'stderr' => [
|
||||
'driver' => 'monolog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'handler' => StreamHandler::class,
|
||||
'formatter' => env('LOG_STDERR_FORMATTER'),
|
||||
'with' => [
|
||||
'stream' => 'php://stderr',
|
||||
],
|
||||
'processors' => [PsrLogMessageProcessor::class],
|
||||
],
|
||||
|
||||
'syslog' => [
|
||||
'driver' => 'syslog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'facility' => LOG_USER,
|
||||
'replace_placeholders' => true,
|
||||
],
|
||||
|
||||
'errorlog' => [
|
||||
'driver' => 'errorlog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'replace_placeholders' => true,
|
||||
],
|
||||
|
||||
'null' => [
|
||||
'driver' => 'monolog',
|
||||
'handler' => NullHandler::class,
|
||||
],
|
||||
|
||||
'emergency' => [
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
],
|
||||
],
|
||||
|
||||
];
|
124
config/mail.php
Normal file
124
config/mail.php
Normal file
|
@ -0,0 +1,124 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Mailer
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default mailer that is used to send any email
|
||||
| messages sent by your application. Alternative mailers may be setup
|
||||
| and used as needed; however, this mailer will be used by default.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('MAIL_MAILER', 'smtp'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Mailer Configurations
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure all of the mailers used by your application plus
|
||||
| their respective settings. Several examples have been configured for
|
||||
| you and you are free to add your own as your application requires.
|
||||
|
|
||||
| Laravel supports a variety of mail "transport" drivers to be used while
|
||||
| sending an e-mail. You will specify which one you are using for your
|
||||
| mailers below. You are free to add additional mailers as required.
|
||||
|
|
||||
| Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2",
|
||||
| "postmark", "log", "array", "failover"
|
||||
|
|
||||
*/
|
||||
|
||||
'mailers' => [
|
||||
'smtp' => [
|
||||
'transport' => 'smtp',
|
||||
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
|
||||
'port' => env('MAIL_PORT', 587),
|
||||
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
|
||||
'username' => env('MAIL_USERNAME'),
|
||||
'password' => env('MAIL_PASSWORD'),
|
||||
'timeout' => null,
|
||||
'local_domain' => env('MAIL_EHLO_DOMAIN'),
|
||||
],
|
||||
|
||||
'ses' => [
|
||||
'transport' => 'ses',
|
||||
],
|
||||
|
||||
'mailgun' => [
|
||||
'transport' => 'mailgun',
|
||||
// 'client' => [
|
||||
// 'timeout' => 5,
|
||||
// ],
|
||||
],
|
||||
|
||||
'postmark' => [
|
||||
'transport' => 'postmark',
|
||||
// 'client' => [
|
||||
// 'timeout' => 5,
|
||||
// ],
|
||||
],
|
||||
|
||||
'sendmail' => [
|
||||
'transport' => 'sendmail',
|
||||
'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'),
|
||||
],
|
||||
|
||||
'log' => [
|
||||
'transport' => 'log',
|
||||
'channel' => env('MAIL_LOG_CHANNEL'),
|
||||
],
|
||||
|
||||
'array' => [
|
||||
'transport' => 'array',
|
||||
],
|
||||
|
||||
'failover' => [
|
||||
'transport' => 'failover',
|
||||
'mailers' => [
|
||||
'smtp',
|
||||
'log',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Global "From" Address
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You may wish for all e-mails sent by your application to be sent from
|
||||
| the same address. Here, you may specify a name and address that is
|
||||
| used globally for all e-mails that are sent by your application.
|
||||
|
|
||||
*/
|
||||
|
||||
'from' => [
|
||||
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
|
||||
'name' => env('MAIL_FROM_NAME', 'Example'),
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Markdown Mail Settings
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If you are using Markdown based email rendering, you may configure your
|
||||
| theme and component paths here, allowing you to customize the design
|
||||
| of the emails. Or, you may simply stick with the Laravel defaults!
|
||||
|
|
||||
*/
|
||||
|
||||
'markdown' => [
|
||||
'theme' => 'default',
|
||||
|
||||
'paths' => [
|
||||
resource_path('views/vendor/mail'),
|
||||
],
|
||||
],
|
||||
|
||||
];
|
109
config/queue.php
Normal file
109
config/queue.php
Normal file
|
@ -0,0 +1,109 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Queue Connection Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Laravel's queue API supports an assortment of back-ends via a single
|
||||
| API, giving you convenient access to each back-end using the same
|
||||
| syntax for every one. Here you may define a default connection.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => env('QUEUE_CONNECTION', 'sync'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Queue Connections
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure the connection information for each server that
|
||||
| is used by your application. A default configuration has been added
|
||||
| for each back-end shipped with Laravel. You are free to add more.
|
||||
|
|
||||
| Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null"
|
||||
|
|
||||
*/
|
||||
|
||||
'connections' => [
|
||||
|
||||
'sync' => [
|
||||
'driver' => 'sync',
|
||||
],
|
||||
|
||||
'database' => [
|
||||
'driver' => 'database',
|
||||
'table' => 'jobs',
|
||||
'queue' => 'default',
|
||||
'retry_after' => 90,
|
||||
'after_commit' => false,
|
||||
],
|
||||
|
||||
'beanstalkd' => [
|
||||
'driver' => 'beanstalkd',
|
||||
'host' => 'localhost',
|
||||
'queue' => 'default',
|
||||
'retry_after' => 90,
|
||||
'block_for' => 0,
|
||||
'after_commit' => false,
|
||||
],
|
||||
|
||||
'sqs' => [
|
||||
'driver' => 'sqs',
|
||||
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
|
||||
'queue' => env('SQS_QUEUE', 'default'),
|
||||
'suffix' => env('SQS_SUFFIX'),
|
||||
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||
'after_commit' => false,
|
||||
],
|
||||
|
||||
'redis' => [
|
||||
'driver' => 'redis',
|
||||
'connection' => 'default',
|
||||
'queue' => env('REDIS_QUEUE', 'default'),
|
||||
'retry_after' => 90,
|
||||
'block_for' => null,
|
||||
'after_commit' => false,
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Job Batching
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following options configure the database and table that store job
|
||||
| batching information. These options can be updated to any database
|
||||
| connection and table which has been defined by your application.
|
||||
|
|
||||
*/
|
||||
|
||||
'batching' => [
|
||||
'database' => env('DB_CONNECTION', 'mysql'),
|
||||
'table' => 'job_batches',
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Failed Queue Jobs
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These options configure the behavior of failed queue job logging so you
|
||||
| can control which database and table are used to store the jobs that
|
||||
| have failed. You may change them to any database / table you wish.
|
||||
|
|
||||
*/
|
||||
|
||||
'failed' => [
|
||||
'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
|
||||
'database' => env('DB_CONNECTION', 'mysql'),
|
||||
'table' => 'failed_jobs',
|
||||
],
|
||||
|
||||
];
|
67
config/sanctum.php
Normal file
67
config/sanctum.php
Normal file
|
@ -0,0 +1,67 @@
|
|||
<?php
|
||||
|
||||
use Laravel\Sanctum\Sanctum;
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Stateful Domains
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Requests from the following domains / hosts will receive stateful API
|
||||
| authentication cookies. Typically, these should include your local
|
||||
| and production domains which access your API via a frontend SPA.
|
||||
|
|
||||
*/
|
||||
|
||||
'stateful' => explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf(
|
||||
'%s%s',
|
||||
'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1',
|
||||
Sanctum::currentApplicationUrlWithPort()
|
||||
))),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Sanctum Guards
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This array contains the authentication guards that will be checked when
|
||||
| Sanctum is trying to authenticate a request. If none of these guards
|
||||
| are able to authenticate the request, Sanctum will use the bearer
|
||||
| token that's present on an incoming request for authentication.
|
||||
|
|
||||
*/
|
||||
|
||||
'guard' => ['web'],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Expiration Minutes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This value controls the number of minutes until an issued token will be
|
||||
| considered expired. If this value is null, personal access tokens do
|
||||
| not expire. This won't tweak the lifetime of first-party sessions.
|
||||
|
|
||||
*/
|
||||
|
||||
'expiration' => null,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Sanctum Middleware
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When authenticating your first-party SPA with Sanctum you may need to
|
||||
| customize some of the middleware Sanctum uses while processing the
|
||||
| request. You may change the middleware listed below as required.
|
||||
|
|
||||
*/
|
||||
|
||||
'middleware' => [
|
||||
'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class,
|
||||
'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class,
|
||||
],
|
||||
|
||||
];
|
34
config/services.php
Normal file
34
config/services.php
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Third Party Services
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This file is for storing the credentials for third party services such
|
||||
| as Mailgun, Postmark, AWS and more. This file provides the de facto
|
||||
| location for this type of information, allowing packages to have
|
||||
| a conventional file to locate the various service credentials.
|
||||
|
|
||||
*/
|
||||
|
||||
'mailgun' => [
|
||||
'domain' => env('MAILGUN_DOMAIN'),
|
||||
'secret' => env('MAILGUN_SECRET'),
|
||||
'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
|
||||
'scheme' => 'https',
|
||||
],
|
||||
|
||||
'postmark' => [
|
||||
'token' => env('POSTMARK_TOKEN'),
|
||||
],
|
||||
|
||||
'ses' => [
|
||||
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||
],
|
||||
|
||||
];
|
201
config/session.php
Normal file
201
config/session.php
Normal file
|
@ -0,0 +1,201 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Session Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default session "driver" that will be used on
|
||||
| requests. By default, we will use the lightweight native driver but
|
||||
| you may specify any of the other wonderful drivers provided here.
|
||||
|
|
||||
| Supported: "file", "cookie", "database", "apc",
|
||||
| "memcached", "redis", "dynamodb", "array"
|
||||
|
|
||||
*/
|
||||
|
||||
'driver' => env('SESSION_DRIVER', 'file'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Lifetime
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the number of minutes that you wish the session
|
||||
| to be allowed to remain idle before it expires. If you want them
|
||||
| to immediately expire on the browser closing, set that option.
|
||||
|
|
||||
*/
|
||||
|
||||
'lifetime' => env('SESSION_LIFETIME', 120),
|
||||
|
||||
'expire_on_close' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Encryption
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option allows you to easily specify that all of your session data
|
||||
| should be encrypted before it is stored. All encryption will be run
|
||||
| automatically by Laravel and you can use the Session like normal.
|
||||
|
|
||||
*/
|
||||
|
||||
'encrypt' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session File Location
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the native session driver, we need a location where session
|
||||
| files may be stored. A default has been set for you but a different
|
||||
| location may be specified. This is only needed for file sessions.
|
||||
|
|
||||
*/
|
||||
|
||||
'files' => storage_path('framework/sessions'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Database Connection
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the "database" or "redis" session drivers, you may specify a
|
||||
| connection that should be used to manage these sessions. This should
|
||||
| correspond to a connection in your database configuration options.
|
||||
|
|
||||
*/
|
||||
|
||||
'connection' => env('SESSION_CONNECTION'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Database Table
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the "database" session driver, you may specify the table we
|
||||
| should use to manage the sessions. Of course, a sensible default is
|
||||
| provided for you; however, you are free to change this as needed.
|
||||
|
|
||||
*/
|
||||
|
||||
'table' => 'sessions',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Cache Store
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| While using one of the framework's cache driven session backends you may
|
||||
| list a cache store that should be used for these sessions. This value
|
||||
| must match with one of the application's configured cache "stores".
|
||||
|
|
||||
| Affects: "apc", "dynamodb", "memcached", "redis"
|
||||
|
|
||||
*/
|
||||
|
||||
'store' => env('SESSION_STORE'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Sweeping Lottery
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Some session drivers must manually sweep their storage location to get
|
||||
| rid of old sessions from storage. Here are the chances that it will
|
||||
| happen on a given request. By default, the odds are 2 out of 100.
|
||||
|
|
||||
*/
|
||||
|
||||
'lottery' => [2, 100],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Cookie Name
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may change the name of the cookie used to identify a session
|
||||
| instance by ID. The name specified here will get used every time a
|
||||
| new session cookie is created by the framework for every driver.
|
||||
|
|
||||
*/
|
||||
|
||||
'cookie' => env(
|
||||
'SESSION_COOKIE',
|
||||
Str::slug(env('APP_NAME', 'laravel'), '_').'_session'
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Cookie Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The session cookie path determines the path for which the cookie will
|
||||
| be regarded as available. Typically, this will be the root path of
|
||||
| your application but you are free to change this when necessary.
|
||||
|
|
||||
*/
|
||||
|
||||
'path' => '/',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Session Cookie Domain
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may change the domain of the cookie used to identify a session
|
||||
| in your application. This will determine which domains the cookie is
|
||||
| available to in your application. A sensible default has been set.
|
||||
|
|
||||
*/
|
||||
|
||||
'domain' => env('SESSION_DOMAIN'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| HTTPS Only Cookies
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| By setting this option to true, session cookies will only be sent back
|
||||
| to the server if the browser has a HTTPS connection. This will keep
|
||||
| the cookie from being sent to you when it can't be done securely.
|
||||
|
|
||||
*/
|
||||
|
||||
'secure' => env('SESSION_SECURE_COOKIE'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| HTTP Access Only
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Setting this value to true will prevent JavaScript from accessing the
|
||||
| value of the cookie and the cookie will only be accessible through
|
||||
| the HTTP protocol. You are free to modify this option if needed.
|
||||
|
|
||||
*/
|
||||
|
||||
'http_only' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Same-Site Cookies
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option determines how your cookies behave when cross-site requests
|
||||
| take place, and can be used to mitigate CSRF attacks. By default, we
|
||||
| will set this value to "lax" since this is a secure default value.
|
||||
|
|
||||
| Supported: "lax", "strict", "none", null
|
||||
|
|
||||
*/
|
||||
|
||||
'same_site' => 'lax',
|
||||
|
||||
];
|
36
config/view.php
Normal file
36
config/view.php
Normal file
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| View Storage Paths
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Most templating systems load templates from disk. Here you may specify
|
||||
| an array of paths that should be checked for your views. Of course
|
||||
| the usual Laravel view path has already been registered for you.
|
||||
|
|
||||
*/
|
||||
|
||||
'paths' => [
|
||||
resource_path('views'),
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Compiled View Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option determines where all the compiled Blade templates will be
|
||||
| stored for your application. Typically, this is within the storage
|
||||
| directory. However, as usual, you are free to change this value.
|
||||
|
|
||||
*/
|
||||
|
||||
'compiled' => env(
|
||||
'VIEW_COMPILED_PATH',
|
||||
realpath(storage_path('framework/views'))
|
||||
),
|
||||
|
||||
];
|
1
database/.gitignore
vendored
Normal file
1
database/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
*.sqlite*
|
40
database/factories/UserFactory.php
Normal file
40
database/factories/UserFactory.php
Normal file
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
|
||||
*/
|
||||
class UserFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => fake()->name(),
|
||||
'email' => fake()->unique()->safeEmail(),
|
||||
'email_verified_at' => now(),
|
||||
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
|
||||
'gender' => ['male', 'female'][rand(0, 1)],
|
||||
'active' => 1,
|
||||
'remember_token' => Str::random(10),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that the model's email address should be unverified.
|
||||
*/
|
||||
public function unverified(): static
|
||||
{
|
||||
return $this->state(fn (array $attributes) => [
|
||||
'email_verified_at' => null,
|
||||
]);
|
||||
}
|
||||
}
|
36
database/migrations/2014_10_12_000000_create_users_table.php
Normal file
36
database/migrations/2014_10_12_000000_create_users_table.php
Normal file
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('email')->unique();
|
||||
$table->timestamp('email_verified_at')->nullable();
|
||||
$table->string('password');
|
||||
$table->string('photo')->nullable();
|
||||
$table->string('gender');
|
||||
$table->integer('active');
|
||||
$table->softDeletes();
|
||||
$table->rememberToken();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('users');
|
||||
}
|
||||
};
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('password_reset_tokens', function (Blueprint $table) {
|
||||
$table->string('email')->primary();
|
||||
$table->string('token');
|
||||
$table->timestamp('created_at')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('password_reset_tokens');
|
||||
}
|
||||
};
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('failed_jobs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('uuid')->unique();
|
||||
$table->text('connection');
|
||||
$table->text('queue');
|
||||
$table->longText('payload');
|
||||
$table->longText('exception');
|
||||
$table->timestamp('failed_at')->useCurrent();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('failed_jobs');
|
||||
}
|
||||
};
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('personal_access_tokens', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->morphs('tokenable');
|
||||
$table->string('name');
|
||||
$table->string('token', 64)->unique();
|
||||
$table->text('abilities')->nullable();
|
||||
$table->timestamp('last_used_at')->nullable();
|
||||
$table->timestamp('expires_at')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('personal_access_tokens');
|
||||
}
|
||||
};
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('route_categories', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name_it');
|
||||
$table->string('name_en');
|
||||
$table->string('description_it');
|
||||
$table->string('description_en');
|
||||
$table->string('icon');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('categories');
|
||||
}
|
||||
};
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('routes', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->string('name_it');
|
||||
$table->string('name_en');
|
||||
$table->text('description_it')->nullable();
|
||||
$table->text('description_en')->nullable();
|
||||
// sport type defined in pivot table
|
||||
// pics defined in pivot table - first pic is the cover
|
||||
$table->unsignedBigInteger('route_category_id');
|
||||
$table->foreign('route_category_id')->references('id')->on('categories')->onDelete('cascade');
|
||||
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('routes');
|
||||
}
|
||||
};
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('placemarks', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->tinyInteger('sequence_number');
|
||||
$table->string('name_it');
|
||||
$table->string('name_en');
|
||||
$table->text('description_it')->nullable();
|
||||
$table->text('description_en')->nullable();
|
||||
$table->float('latitude',8,6);
|
||||
$table->float('longitude',8,6);
|
||||
// pics defined in pivot table
|
||||
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('placemarks');
|
||||
}
|
||||
};
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('pictures', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('filename');
|
||||
$table->string('description_it', 300)->nullable();
|
||||
$table->string('description_en', 300)->nullable();
|
||||
$table->unsignedInteger('file_size');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('pictures');
|
||||
}
|
||||
};
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('feedback', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('title');
|
||||
$table->text('body');
|
||||
$table->unsignedInteger('rating');
|
||||
$table->string('user_nickname',100);
|
||||
$table->tinyInteger('approved')->default(0)->comment('when 1 the comment can be public');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('feedback');
|
||||
}
|
||||
};
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('route_picture', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->unsignedBigInteger('route_id');
|
||||
$table->unsignedBigInteger('picture_id');
|
||||
$table->foreign('route_id')->references('id')->on('routes')->onDelete('cascade');
|
||||
$table->foreign('picture_id')->references('id')->on('pictures')->onDelete('cascade');
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('route_picture');
|
||||
}
|
||||
};
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('route_sport_detail_placemark', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('route_sport_detail_id');
|
||||
$table->unsignedBigInteger('placemark_id');
|
||||
|
||||
$table->foreign('route_sport_detail_id')->references('id')->on('route_sport_details')->onDelete('cascade');
|
||||
$table->foreign('placemark_id')->references('id')->on('placemarks')->onDelete('cascade');
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('route_placemark');
|
||||
}
|
||||
};
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('route_feedbacks', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('route_id');
|
||||
$table->unsignedBigInteger('feedback_id');
|
||||
|
||||
$table->foreign('route_id')->references('id')->on('routes')->onDelete('cascade');
|
||||
$table->foreign('feedback_id')->references('id')->on('feedbacks')->onDelete('cascade');
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('route_feedback');
|
||||
}
|
||||
};
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('sports', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name_it');
|
||||
$table->string('name_en');
|
||||
$table->string('description_it');
|
||||
$table->string('description_en');
|
||||
$table->string('icon');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('sports');
|
||||
}
|
||||
};
|
|
@ -0,0 +1,47 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('route_sport_details', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('route_id');
|
||||
$table->foreign('route_id')->references('id')->on('routes')->onDelete('cascade');
|
||||
$table->unsignedBigInteger('sport_id');
|
||||
$table->foreign('sport_id')->references('id')->on('sports')->onDelete('cascade');
|
||||
|
||||
$table->string('short_description_it')->nullable();
|
||||
$table->string('short_description_en')->nullable();
|
||||
$table->string('gpx_path')->comment('url to the gpx file');
|
||||
$table->integer('distance')->comment('in meters')->nullable();
|
||||
$table->integer('duration')->comment('in minutes')->nullable();
|
||||
$table->integer('elevation_gain')->nullable();
|
||||
$table->integer('elevation_loss')->nullable();
|
||||
$table->integer('altitude_max')->comment('in meters')->nullable();
|
||||
$table->integer('altitude_min')->comment('in meters')->nullable();
|
||||
$table->string('difficulty_it')->comment('in words')->nullable();
|
||||
$table->string('difficulty_en')->comment('in words')->nullable();
|
||||
$table->string('route_type_it')->comment('in words')->nullable();
|
||||
$table->string('route_type_en')->comment('in words')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('route_sport_details');
|
||||
}
|
||||
};
|
16
database/seeders/DatabaseSeeder.php
Normal file
16
database/seeders/DatabaseSeeder.php
Normal file
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Seed the application's database.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$this->call(UserSeeder::class);
|
||||
}
|
||||
}
|
34
database/seeders/UserSeeder.php
Normal file
34
database/seeders/UserSeeder.php
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Str;
|
||||
use App\Models\User;
|
||||
|
||||
class UserSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
// Default credentials
|
||||
\App\Models\User::insert([
|
||||
[
|
||||
'name' => 'Left4code',
|
||||
'email' => 'midone@left4code.com',
|
||||
'email_verified_at' => now(),
|
||||
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
|
||||
'gender' => 'male',
|
||||
'active' => 1,
|
||||
'remember_token' => Str::random(10)
|
||||
]
|
||||
]);
|
||||
|
||||
// Fake users
|
||||
User::factory()->times(9)->create();
|
||||
}
|
||||
}
|
52
package.json
Normal file
52
package.json
Normal file
|
@ -0,0 +1,52 @@
|
|||
{
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ckeditor/ckeditor5-build-balloon": "^35.1.0",
|
||||
"@ckeditor/ckeditor5-build-balloon-block": "^35.1.0",
|
||||
"@ckeditor/ckeditor5-build-classic": "^35.1.0",
|
||||
"@ckeditor/ckeditor5-build-decoupled-document": "^35.1.0",
|
||||
"@ckeditor/ckeditor5-build-inline": "^35.1.0",
|
||||
"@fullcalendar/core": "^6.1.7",
|
||||
"@fullcalendar/daygrid": "^6.1.7",
|
||||
"@fullcalendar/interaction": "^6.1.7",
|
||||
"@fullcalendar/list": "^6.1.7",
|
||||
"@fullcalendar/timegrid": "^6.1.7",
|
||||
"@left4code/tw-starter": "^3.2.9",
|
||||
"chart.js": "^3.9.1",
|
||||
"dayjs": "^1.11.5",
|
||||
"dropzone": "^6.0.0-beta.2",
|
||||
"flat": "^5.0.2",
|
||||
"highlight.js": "^11.6.0",
|
||||
"js-beautify": "^1.14.6",
|
||||
"leaflet": "^1.9.3",
|
||||
"leaflet.markercluster": "^1.5.3",
|
||||
"litepicker": "^2.0.12",
|
||||
"lucide": "^0.90.0",
|
||||
"pristinejs": "^1.0.0",
|
||||
"simplebar": "^5.3.9",
|
||||
"tabulator-tables": "^5.3.4",
|
||||
"tailwind-merge": "^1.8.1",
|
||||
"tiny-slider": "^2.9.4",
|
||||
"tippy.js": "^6.3.7",
|
||||
"toastify-js": "^1.12.0",
|
||||
"tom-select": "^2.2.0",
|
||||
"xlsx": "^0.18.5",
|
||||
"zoom-vanilla.js": "^2.0.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/forms": "^0.5.2",
|
||||
"autoprefixer": "^10.4.13",
|
||||
"axios": "^1.1.2",
|
||||
"laravel-vite-plugin": "^0.7.2",
|
||||
"lodash": "^4.17.19",
|
||||
"postcss": "^8.4.20",
|
||||
"postcss-advanced-variables": "^3.0.1",
|
||||
"postcss-import": "^14.1.0",
|
||||
"tailwindcss": "^3.2.4",
|
||||
"vite": "^4.0.0"
|
||||
}
|
||||
}
|
31
phpunit.xml
Normal file
31
phpunit.xml
Normal file
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
|
||||
bootstrap="vendor/autoload.php"
|
||||
colors="true"
|
||||
>
|
||||
<testsuites>
|
||||
<testsuite name="Unit">
|
||||
<directory suffix="Test.php">./tests/Unit</directory>
|
||||
</testsuite>
|
||||
<testsuite name="Feature">
|
||||
<directory suffix="Test.php">./tests/Feature</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<source>
|
||||
<include>
|
||||
<directory suffix=".php">./app</directory>
|
||||
</include>
|
||||
</source>
|
||||
<php>
|
||||
<env name="APP_ENV" value="testing"/>
|
||||
<env name="BCRYPT_ROUNDS" value="4"/>
|
||||
<env name="CACHE_DRIVER" value="array"/>
|
||||
<!-- <env name="DB_CONNECTION" value="sqlite"/> -->
|
||||
<!-- <env name="DB_DATABASE" value=":memory:"/> -->
|
||||
<env name="MAIL_MAILER" value="array"/>
|
||||
<env name="QUEUE_CONNECTION" value="sync"/>
|
||||
<env name="SESSION_DRIVER" value="array"/>
|
||||
<env name="TELESCOPE_ENABLED" value="false"/>
|
||||
</php>
|
||||
</phpunit>
|
9
postcss.config.js
Normal file
9
postcss.config.js
Normal file
|
@ -0,0 +1,9 @@
|
|||
module.exports = {
|
||||
plugins: [
|
||||
require("postcss-import"),
|
||||
require("postcss-advanced-variables"),
|
||||
require("tailwindcss/nesting"),
|
||||
require("tailwindcss")("./tailwind.config.js"),
|
||||
require("autoprefixer"),
|
||||
],
|
||||
};
|
32
routes/api.php
Normal file
32
routes/api.php
Normal file
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use App\Http\Controllers\RouteController;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| API Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here is where you can register API routes for your application. These
|
||||
| routes are loaded by the RouteServiceProvider and all of them will
|
||||
| be assigned to the "api" middleware group. Make something great!
|
||||
|
|
||||
*/
|
||||
|
||||
Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
|
||||
return $request->user();
|
||||
});
|
||||
|
||||
Route::get('all-routes', [RouteController::class, 'getAllRoutes']); // this will return an array of [id, title, length, elevation_gain and possible sports] for each route
|
||||
Route::get('route-categories', [RouteController::class, 'getRoutesCategories']); // this will return an array of [id, title, length, elevation_gain and possible sports] for each route
|
||||
Route::get('route-by-category/{catId}', [RouteController::class, 'getRoutesByCategory']); // this will return an array of [id, title, length, elevation_gain and possible sports] for each route
|
||||
|
||||
Route::get('route/{id}', [RouteController::class, 'getSingleRoute']); // this will return details for all sports related to this route, including picture urls
|
||||
Route::get('route/{id}/{sportId}', [RouteController::class, 'getSingleRouteDetails']); // this will return route's details for a single sport, including picture urls
|
||||
Route::get('downloadGpx/{id}/{sportId}', [RouteController::class, 'downloadGpx']); // download the gpx file of a route given the route id and the chosen sport
|
||||
Route::get('getPlacemarks/{id}/{sportId}', [RouteController::class, 'getPlacemarks']); // this will return the list of placemark for a specific sport on a specifi route
|
||||
|
||||
Route::get('getFeedbacks/{id}/{sportId}', [RouteController::class, 'getFeedbacks']); // get all feedbacks on a route given the route id and the chosen sport
|
||||
Route::post('storeFeedback', [RouteController::class, 'storeFeedback']); // store feedback on a route given the route id and the chosen sport
|
18
routes/channels.php
Normal file
18
routes/channels.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Broadcast;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Broadcast Channels
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may register all of the event broadcasting channels that your
|
||||
| application supports. The given channel authorization callbacks are
|
||||
| used to check if an authenticated user can listen to the channel.
|
||||
|
|
||||
*/
|
||||
|
||||
Broadcast::channel('App.Models.User.{id}', function ($user, $id) {
|
||||
return (int) $user->id === (int) $id;
|
||||
});
|
19
routes/console.php
Normal file
19
routes/console.php
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Foundation\Inspiring;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Console Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This file is where you may define all of your Closure based console
|
||||
| commands. Each Closure is bound to a command instance allowing a
|
||||
| simple approach to interacting with each command's IO methods.
|
||||
|
|
||||
*/
|
||||
|
||||
Artisan::command('inspire', function () {
|
||||
$this->comment(Inspiring::quote());
|
||||
})->purpose('Display an inspiring quote');
|
105
routes/web.php
Normal file
105
routes/web.php
Normal file
|
@ -0,0 +1,105 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use App\Http\Controllers\AuthController;
|
||||
use App\Http\Controllers\PageController;
|
||||
use App\Http\Controllers\DarkModeController;
|
||||
use App\Http\Controllers\ColorSchemeController;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Web Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here is where you can register web routes for your application. These
|
||||
| routes are loaded by the RouteServiceProvider and all of them will
|
||||
| be assigned to the "web" middleware group. Make something great!
|
||||
|
|
||||
*/
|
||||
|
||||
Route::get('dark-mode-switcher', [DarkModeController::class, 'switch'])->name('dark-mode-switcher');
|
||||
Route::get('color-scheme-switcher/{color_scheme}', [ColorSchemeController::class, 'switch'])->name('color-scheme-switcher');
|
||||
|
||||
Route::controller(AuthController::class)->middleware('loggedin')->group(function () {
|
||||
Route::get('login', 'loginView')->name('login.index');
|
||||
Route::post('login', 'login')->name('login.check');
|
||||
});
|
||||
|
||||
Route::middleware('auth')->group(function () {
|
||||
Route::get('logout', [AuthController::class, 'logout'])->name('logout');
|
||||
Route::controller(PageController::class)->group(function () {
|
||||
Route::get('/', 'dashboardOverview1')->name('dashboard-overview-1');
|
||||
Route::get('dashboard-overview-2-page', 'dashboardOverview2')->name('dashboard-overview-2');
|
||||
Route::get('dashboard-overview-3-page', 'dashboardOverview3')->name('dashboard-overview-3');
|
||||
Route::get('dashboard-overview-4-page', 'dashboardOverview4')->name('dashboard-overview-4');
|
||||
Route::get('categories-page', 'categories')->name('categories');
|
||||
Route::get('add-product-page', 'addProduct')->name('add-product');
|
||||
Route::get('product-list-page', 'productList')->name('product-list');
|
||||
Route::get('product-grid-page', 'productGrid')->name('product-grid');
|
||||
Route::get('transaction-list-page', 'transactionList')->name('transaction-list');
|
||||
Route::get('transaction-detail-page', 'transactionDetail')->name('transaction-detail');
|
||||
Route::get('seller-list-page', 'sellerList')->name('seller-list');
|
||||
Route::get('seller-detail-page', 'sellerDetail')->name('seller-detail');
|
||||
Route::get('reviews-page', 'reviews')->name('reviews');
|
||||
Route::get('inbox-page', 'inbox')->name('inbox');
|
||||
Route::get('file-manager-page', 'fileManager')->name('file-manager');
|
||||
Route::get('point-of-sale-page', 'pointOfSale')->name('point-of-sale');
|
||||
Route::get('chat-page', 'chat')->name('chat');
|
||||
Route::get('post-page', 'post')->name('post');
|
||||
Route::get('calendar-page', 'calendar')->name('calendar');
|
||||
Route::get('crud-data-list-page', 'crudDataList')->name('crud-data-list');
|
||||
Route::get('crud-form-page', 'crudForm')->name('crud-form');
|
||||
Route::get('users-layout-1-page', 'usersLayout1')->name('users-layout-1');
|
||||
Route::get('users-layout-2-page', 'usersLayout2')->name('users-layout-2');
|
||||
Route::get('users-layout-3-page', 'usersLayout3')->name('users-layout-3');
|
||||
Route::get('profile-overview-1-page', 'profileOverview1')->name('profile-overview-1');
|
||||
Route::get('profile-overview-2-page', 'profileOverview2')->name('profile-overview-2');
|
||||
Route::get('profile-overview-3-page', 'profileOverview3')->name('profile-overview-3');
|
||||
Route::get('wizard-layout-1-page', 'wizardLayout1')->name('wizard-layout-1');
|
||||
Route::get('wizard-layout-2-page', 'wizardLayout2')->name('wizard-layout-2');
|
||||
Route::get('wizard-layout-3-page', 'wizardLayout3')->name('wizard-layout-3');
|
||||
Route::get('blog-layout-1-page', 'blogLayout1')->name('blog-layout-1');
|
||||
Route::get('blog-layout-2-page', 'blogLayout2')->name('blog-layout-2');
|
||||
Route::get('blog-layout-3-page', 'blogLayout3')->name('blog-layout-3');
|
||||
Route::get('pricing-layout-1-page', 'pricingLayout1')->name('pricing-layout-1');
|
||||
Route::get('pricing-layout-2-page', 'pricingLayout2')->name('pricing-layout-2');
|
||||
Route::get('invoice-layout-1-page', 'invoiceLayout1')->name('invoice-layout-1');
|
||||
Route::get('invoice-layout-2-page', 'invoiceLayout2')->name('invoice-layout-2');
|
||||
Route::get('faq-layout-1-page', 'faqLayout1')->name('faq-layout-1');
|
||||
Route::get('faq-layout-2-page', 'faqLayout2')->name('faq-layout-2');
|
||||
Route::get('faq-layout-3-page', 'faqLayout3')->name('faq-layout-3');
|
||||
Route::get('login-page', 'login')->name('login');
|
||||
Route::get('register-page', 'register')->name('register');
|
||||
Route::get('error-page-page', 'errorPage')->name('error-page');
|
||||
Route::get('update-profile-page', 'updateProfile')->name('update-profile');
|
||||
Route::get('change-password-page', 'changePassword')->name('change-password');
|
||||
Route::get('regular-table-page', 'regularTable')->name('regular-table');
|
||||
Route::get('tabulator-page', 'tabulator')->name('tabulator');
|
||||
Route::get('modal-page', 'modal')->name('modal');
|
||||
Route::get('slide-over-page', 'slideOver')->name('slide-over');
|
||||
Route::get('notification-page', 'notification')->name('notification');
|
||||
Route::get('tab-page', 'tab')->name('tab');
|
||||
Route::get('accordion-page', 'accordion')->name('accordion');
|
||||
Route::get('button-page', 'button')->name('button');
|
||||
Route::get('alert-page', 'alert')->name('alert');
|
||||
Route::get('progress-bar-page', 'progressBar')->name('progress-bar');
|
||||
Route::get('tooltip-page', 'tooltip')->name('tooltip');
|
||||
Route::get('dropdown-page', 'dropdown')->name('dropdown');
|
||||
Route::get('typography-page', 'typography')->name('typography');
|
||||
Route::get('icon-page', 'icon')->name('icon');
|
||||
Route::get('loading-icon-page', 'loadingIcon')->name('loading-icon');
|
||||
Route::get('regular-form-page', 'regularForm')->name('regular-form');
|
||||
Route::get('datepicker-page', 'datepicker')->name('datepicker');
|
||||
Route::get('tom-select-page', 'tomSelect')->name('tom-select');
|
||||
Route::get('file-upload-page', 'fileUpload')->name('file-upload');
|
||||
Route::get('wysiwyg-editor-classic-page', 'wysiwygEditorClassic')->name('wysiwyg-editor-classic');
|
||||
Route::get('wysiwyg-editor-inline-page', 'wysiwygEditorInline')->name('wysiwyg-editor-inline');
|
||||
Route::get('wysiwyg-editor-balloon-page', 'wysiwygEditorBalloon')->name('wysiwyg-editor-balloon');
|
||||
Route::get('wysiwyg-editor-balloon-block-page', 'wysiwygEditorBalloonBlock')->name('wysiwyg-editor-balloon-block');
|
||||
Route::get('wysiwyg-editor-document-page', 'wysiwygEditorDocument')->name('wysiwyg-editor-document');
|
||||
Route::get('validation-page', 'validation')->name('validation');
|
||||
Route::get('chart-page', 'chart')->name('chart');
|
||||
Route::get('slider-page', 'slider')->name('slider');
|
||||
Route::get('image-zoom-page', 'imageZoom')->name('image-zoom');
|
||||
});
|
||||
});
|
241
tailwind.config.js
Normal file
241
tailwind.config.js
Normal file
|
@ -0,0 +1,241 @@
|
|||
const plugin = require("tailwindcss/plugin");
|
||||
const colors = require("tailwindcss/colors");
|
||||
const { parseColor } = require("tailwindcss/lib/util/color");
|
||||
|
||||
/** Converts HEX color to RGB */
|
||||
const toRGB = (value) => {
|
||||
return parseColor(value).color.join(" ");
|
||||
};
|
||||
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
content: ["./resources/**/*.{php,html,js,jsx,ts,tsx}"],
|
||||
safelist: [
|
||||
{
|
||||
pattern: /animate-delay-.+/,
|
||||
},
|
||||
],
|
||||
darkMode: "class",
|
||||
theme: {
|
||||
extend: {
|
||||
colors: {
|
||||
primary: "rgb(var(--color-primary) / <alpha-value>)",
|
||||
secondary: "rgb(var(--color-secondary) / <alpha-value>)",
|
||||
success: "rgb(var(--color-success) / <alpha-value>)",
|
||||
info: "rgb(var(--color-info) / <alpha-value>)",
|
||||
warning: "rgb(var(--color-warning) / <alpha-value>)",
|
||||
pending: "rgb(var(--color-pending) / <alpha-value>)",
|
||||
danger: "rgb(var(--color-danger) / <alpha-value>)",
|
||||
light: "rgb(var(--color-light) / <alpha-value>)",
|
||||
dark: "rgb(var(--color-dark) / <alpha-value>)",
|
||||
darkmode: {
|
||||
50: "rgb(var(--color-darkmode-50) / <alpha-value>)",
|
||||
100: "rgb(var(--color-darkmode-100) / <alpha-value>)",
|
||||
200: "rgb(var(--color-darkmode-200) / <alpha-value>)",
|
||||
300: "rgb(var(--color-darkmode-300) / <alpha-value>)",
|
||||
400: "rgb(var(--color-darkmode-400) / <alpha-value>)",
|
||||
500: "rgb(var(--color-darkmode-500) / <alpha-value>)",
|
||||
600: "rgb(var(--color-darkmode-600) / <alpha-value>)",
|
||||
700: "rgb(var(--color-darkmode-700) / <alpha-value>)",
|
||||
800: "rgb(var(--color-darkmode-800) / <alpha-value>)",
|
||||
900: "rgb(var(--color-darkmode-900) / <alpha-value>)",
|
||||
},
|
||||
},
|
||||
fontFamily: {
|
||||
roboto: ["Roboto"],
|
||||
},
|
||||
container: {
|
||||
center: true,
|
||||
},
|
||||
maxWidth: {
|
||||
"1/4": "25%",
|
||||
"1/2": "50%",
|
||||
"3/4": "75%",
|
||||
},
|
||||
strokeWidth: {
|
||||
0.5: 0.5,
|
||||
1.5: 1.5,
|
||||
2.5: 2.5,
|
||||
},
|
||||
backgroundImage: {
|
||||
"menu-active":
|
||||
"url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='80' viewBox='0 0 20 122.1'%3E%3Cpath data-name='Union 1' d='M16.038 122H16v-2.213a95.805 95.805 0 00-2.886-20.735 94.894 94.894 0 00-7.783-20.434A39.039 39.039 0 010 61.051a39.035 39.035 0 015.331-17.567 94.9 94.9 0 007.783-20.435A95.746 95.746 0 0016 2.314V0h4v122h-3.961v.1l-.001-.1z' fill='%23f1f5f8'/%3E%3C/svg%3E\")",
|
||||
"menu-active-dark":
|
||||
"url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='80' viewBox='0 0 20 122.1'%3E%3Cpath data-name='Union 1' d='M16.038 122H16v-2.213a95.805 95.805 0 00-2.886-20.735 94.894 94.894 0 00-7.783-20.434A39.039 39.039 0 010 61.051a39.035 39.035 0 015.331-17.567 94.9 94.9 0 007.783-20.435A95.746 95.746 0 0016 2.314V0h4v122h-3.961v.1l-.001-.1z' fill='%23232e45'/%3E%3C/svg%3E\")",
|
||||
"skew-pattern":
|
||||
"url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1920.004' height='1193.001' viewBox='0 0 1920.004 1193.001'%3E%3Cpath id='Intersection_13' data-name='Intersection 13' d='M1183.231,1554.011,2050,361.011h346.311V1440.1l-82.762,113.912Zm-706.924-1193H918.725L476.308,969.945Z' transform='translate(-476.307 -361.011)' fill='rgba(255,255,255,0.02)'/%3E%3C/svg%3E%0A\")",
|
||||
"skew-pattern-dark":
|
||||
"url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1920.004' height='1193.001' viewBox='0 0 1920.004 1193.001'%3E%3Cpath id='Intersection_13' data-name='Intersection 13' d='M1183.231,1554.011,2050,361.011h346.311V1440.1l-82.762,113.912Zm-706.924-1193H918.725L476.308,969.945Z' transform='translate(-476.307 -361.011)' fill='rgba(0,0,0,0.06)'/%3E%3C/svg%3E%0A\")",
|
||||
"bredcrumb-chevron-dark":
|
||||
"url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1' stroke-linecap='round' stroke-linejoin='round' class='feather feather-chevron-right breadcrumb__icon'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E\")",
|
||||
"bredcrumb-chevron-light":
|
||||
"url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23e8eeff' stroke-width='1' stroke-linecap='round' stroke-linejoin='round' class='feather feather-chevron-right breadcrumb__icon'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E\")",
|
||||
"bredcrumb-chevron-darkmode":
|
||||
"url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='1' stroke-linecap='round' stroke-linejoin='round' class='feather feather-chevron-right breadcrumb__icon'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E\")",
|
||||
},
|
||||
keyframes: {
|
||||
// Side & simple menu
|
||||
"intro-divider": {
|
||||
"100%": {
|
||||
opacity: 1,
|
||||
},
|
||||
},
|
||||
"intro-menu": {
|
||||
"100%": {
|
||||
opacity: 1,
|
||||
transform: "translateX(0px)",
|
||||
},
|
||||
},
|
||||
|
||||
// Top menu
|
||||
"intro-top-menu": {
|
||||
"100%": {
|
||||
opacity: 1,
|
||||
transform: "translateY(0px)",
|
||||
},
|
||||
},
|
||||
|
||||
// Wrapper
|
||||
"intro-wrapper": {
|
||||
"100%": {
|
||||
opacity: 1,
|
||||
transform: "translateX(0px)",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
require("@tailwindcss/forms"),
|
||||
plugin(function ({ addBase, matchUtilities }) {
|
||||
addBase({
|
||||
// Default colors
|
||||
":root": {
|
||||
"--color-primary": toRGB(colors.blue["900"]),
|
||||
"--color-secondary": toRGB(colors.slate["200"]),
|
||||
"--color-success": toRGB(colors.teal["600"]),
|
||||
"--color-info": toRGB(colors.cyan["500"]),
|
||||
"--color-warning": toRGB(colors.amber["500"]),
|
||||
"--color-pending": toRGB(colors.orange["500"]),
|
||||
"--color-danger": toRGB(colors.red["700"]),
|
||||
"--color-light": toRGB(colors.slate["100"]),
|
||||
"--color-dark": toRGB(colors.slate["800"]),
|
||||
},
|
||||
// Default dark-mode colors
|
||||
".dark": {
|
||||
"--color-primary": toRGB(colors.blue["800"]),
|
||||
"--color-darkmode-50": "87 103 132",
|
||||
"--color-darkmode-100": "74 90 121",
|
||||
"--color-darkmode-200": "65 81 114",
|
||||
"--color-darkmode-300": "53 69 103",
|
||||
"--color-darkmode-400": "48 61 93",
|
||||
"--color-darkmode-500": "41 53 82",
|
||||
"--color-darkmode-600": "40 51 78",
|
||||
"--color-darkmode-700": "35 45 69",
|
||||
"--color-darkmode-800": "27 37 59",
|
||||
"--color-darkmode-900": "15 23 42",
|
||||
},
|
||||
// Theme 1 colors
|
||||
".theme-1": {
|
||||
"--color-primary": toRGB(colors.emerald["900"]),
|
||||
"--color-secondary": toRGB(colors.slate["200"]),
|
||||
"--color-success": toRGB(colors.emerald["600"]),
|
||||
"--color-info": toRGB(colors.cyan["500"]),
|
||||
"--color-warning": toRGB(colors.yellow["400"]),
|
||||
"--color-pending": toRGB(colors.amber["500"]),
|
||||
"--color-danger": toRGB(colors.rose["600"]),
|
||||
"--color-light": toRGB(colors.slate["100"]),
|
||||
"--color-dark": toRGB(colors.slate["800"]),
|
||||
"&.dark": {
|
||||
"--color-primary": toRGB(colors.emerald["800"]),
|
||||
},
|
||||
},
|
||||
// Theme 2 colors
|
||||
".theme-2": {
|
||||
"--color-primary": toRGB(colors.blue["800"]),
|
||||
"--color-secondary": toRGB(colors.slate["200"]),
|
||||
"--color-success": toRGB(colors.lime["500"]),
|
||||
"--color-info": toRGB(colors.cyan["500"]),
|
||||
"--color-warning": toRGB(colors.yellow["400"]),
|
||||
"--color-pending": toRGB(colors.orange["500"]),
|
||||
"--color-danger": toRGB(colors.red["600"]),
|
||||
"--color-light": toRGB(colors.slate["100"]),
|
||||
"--color-dark": toRGB(colors.slate["800"]),
|
||||
"&.dark": {
|
||||
"--color-primary": toRGB(colors.blue["800"]),
|
||||
},
|
||||
},
|
||||
// Theme 3 colors
|
||||
".theme-3": {
|
||||
"--color-primary": toRGB(colors.cyan["900"]),
|
||||
"--color-secondary": toRGB(colors.slate["200"]),
|
||||
"--color-success": toRGB(colors.teal["600"]),
|
||||
"--color-info": toRGB(colors.cyan["500"]),
|
||||
"--color-warning": toRGB(colors.amber["500"]),
|
||||
"--color-pending": toRGB(colors.amber["600"]),
|
||||
"--color-danger": toRGB(colors.red["700"]),
|
||||
"--color-light": toRGB(colors.slate["100"]),
|
||||
"--color-dark": toRGB(colors.slate["800"]),
|
||||
"&.dark": {
|
||||
"--color-primary": toRGB(colors.cyan["800"]),
|
||||
},
|
||||
},
|
||||
// Theme 4 colors
|
||||
".theme-4": {
|
||||
"--color-primary": toRGB(colors.indigo["900"]),
|
||||
"--color-secondary": toRGB(colors.slate["200"]),
|
||||
"--color-success": toRGB(colors.emerald["600"]),
|
||||
"--color-info": toRGB(colors.cyan["500"]),
|
||||
"--color-warning": toRGB(colors.yellow["500"]),
|
||||
"--color-pending": toRGB(colors.orange["600"]),
|
||||
"--color-danger": toRGB(colors.red["700"]),
|
||||
"--color-light": toRGB(colors.slate["100"]),
|
||||
"--color-dark": toRGB(colors.slate["800"]),
|
||||
"&.dark": {
|
||||
"--color-primary": toRGB(colors.indigo["700"]),
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
// Animation delay utilities
|
||||
matchUtilities(
|
||||
{
|
||||
"animate-delay": (value) => ({
|
||||
"animation-delay": value,
|
||||
}),
|
||||
},
|
||||
{
|
||||
values: (() => {
|
||||
const values = {};
|
||||
for (let i = 1; i <= 50; i++) {
|
||||
values[i * 10] = `${i * 0.1}s`;
|
||||
}
|
||||
return values;
|
||||
})(),
|
||||
}
|
||||
);
|
||||
|
||||
// Animation fill mode utilities
|
||||
matchUtilities(
|
||||
{
|
||||
"animate-fill-mode": (value) => ({
|
||||
"animation-fill-mode": value,
|
||||
}),
|
||||
},
|
||||
{
|
||||
values: {
|
||||
none: "none",
|
||||
forwards: "forwards",
|
||||
backwards: "backwards",
|
||||
both: "both",
|
||||
},
|
||||
}
|
||||
);
|
||||
}),
|
||||
],
|
||||
variants: {
|
||||
extend: {
|
||||
boxShadow: ["dark"],
|
||||
},
|
||||
},
|
||||
};
|
21
tests/CreatesApplication.php
Normal file
21
tests/CreatesApplication.php
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace Tests;
|
||||
|
||||
use Illuminate\Contracts\Console\Kernel;
|
||||
use Illuminate\Foundation\Application;
|
||||
|
||||
trait CreatesApplication
|
||||
{
|
||||
/**
|
||||
* Creates the application.
|
||||
*/
|
||||
public function createApplication(): Application
|
||||
{
|
||||
$app = require __DIR__.'/../bootstrap/app.php';
|
||||
|
||||
$app->make(Kernel::class)->bootstrap();
|
||||
|
||||
return $app;
|
||||
}
|
||||
}
|
19
tests/Feature/ExampleTest.php
Normal file
19
tests/Feature/ExampleTest.php
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
// use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
class ExampleTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* A basic test example.
|
||||
*/
|
||||
public function test_the_application_returns_a_successful_response(): void
|
||||
{
|
||||
$response = $this->get('/');
|
||||
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
}
|
10
tests/TestCase.php
Normal file
10
tests/TestCase.php
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace Tests;
|
||||
|
||||
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
|
||||
|
||||
abstract class TestCase extends BaseTestCase
|
||||
{
|
||||
use CreatesApplication;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue