Update to Laravel 8
This commit is contained in:
parent
84fa5f6546
commit
d9c4aa5b92
@ -2,13 +2,8 @@
|
|||||||
|
|
||||||
namespace App\Exceptions;
|
namespace App\Exceptions;
|
||||||
|
|
||||||
use Exception;
|
|
||||||
use Illuminate\Auth\Access\AuthorizationException;
|
|
||||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||||
use Illuminate\Http\Request;
|
use Throwable;
|
||||||
use Illuminate\Http\Response;
|
|
||||||
use Illuminate\Support\Facades\Auth;
|
|
||||||
use Illuminate\Support\Facades\Log;
|
|
||||||
|
|
||||||
class Handler extends ExceptionHandler
|
class Handler extends ExceptionHandler
|
||||||
{
|
{
|
||||||
@ -27,42 +22,20 @@ class Handler extends ExceptionHandler
|
|||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $dontFlash = [
|
protected $dontFlash = [
|
||||||
|
'current_password',
|
||||||
'password',
|
'password',
|
||||||
'password_confirmation',
|
'password_confirmation',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Report or log an exception.
|
* Register the exception handling callbacks for the application.
|
||||||
*
|
*
|
||||||
* @param Exception $exception
|
|
||||||
* @return void
|
* @return void
|
||||||
* @throws Exception
|
|
||||||
*/
|
*/
|
||||||
public function report(Exception $exception)
|
public function register()
|
||||||
{
|
{
|
||||||
parent::report($exception);
|
$this->reportable(function (Throwable $e) {
|
||||||
}
|
//
|
||||||
|
});
|
||||||
/**
|
|
||||||
* Render an exception into an HTTP response.
|
|
||||||
*
|
|
||||||
* @param Request $request
|
|
||||||
* @param Exception $exception
|
|
||||||
* @return Response
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
public function render($request, Exception $exception)
|
|
||||||
{
|
|
||||||
// We'll render a 404 for any authorisation exceptions to hide the fact that the resource exists
|
|
||||||
if ($exception instanceof AuthorizationException) {
|
|
||||||
Log::error('Request not authorised',['user'=>Auth::user()->id,'request'=>$request->path()]);
|
|
||||||
|
|
||||||
if ($request->ajax())
|
|
||||||
return response()->json(['data'=>[]],200);
|
|
||||||
else
|
|
||||||
abort(404,'Not here...');
|
|
||||||
}
|
|
||||||
|
|
||||||
return parent::render($request, $exception);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use Illuminate\Foundation\Bus\DispatchesJobs;
|
|
||||||
use Illuminate\Routing\Controller as BaseController;
|
|
||||||
use Illuminate\Foundation\Validation\ValidatesRequests;
|
|
||||||
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
||||||
|
use Illuminate\Foundation\Bus\DispatchesJobs;
|
||||||
|
use Illuminate\Foundation\Validation\ValidatesRequests;
|
||||||
|
use Illuminate\Routing\Controller as BaseController;
|
||||||
|
|
||||||
class Controller extends BaseController
|
class Controller extends BaseController
|
||||||
{
|
{
|
||||||
|
@ -2,26 +2,31 @@
|
|||||||
|
|
||||||
namespace App\Providers;
|
namespace App\Providers;
|
||||||
|
|
||||||
|
use Illuminate\Cache\RateLimiting\Limit;
|
||||||
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\RateLimiter;
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
||||||
class RouteServiceProvider extends ServiceProvider
|
class RouteServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* This namespace is applied to your controller routes.
|
|
||||||
*
|
|
||||||
* In addition, it is set as the URL generator's root namespace.
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
protected $namespace = 'App\Http\Controllers';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The path to the "home" route for your application.
|
* The path to the "home" route for your application.
|
||||||
*
|
*
|
||||||
|
* This is used by Laravel authentication to redirect users after login.
|
||||||
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public const HOME = '/u/home';
|
public const HOME = '/home';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The controller namespace for the application.
|
||||||
|
*
|
||||||
|
* When present, controller route declarations will automatically be prefixed with this namespace.
|
||||||
|
*
|
||||||
|
* @var string|null
|
||||||
|
*/
|
||||||
|
// protected $namespace = 'App\\Http\\Controllers';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Define your route model bindings, pattern filters, etc.
|
* Define your route model bindings, pattern filters, etc.
|
||||||
@ -30,51 +35,29 @@ class RouteServiceProvider extends ServiceProvider
|
|||||||
*/
|
*/
|
||||||
public function boot()
|
public function boot()
|
||||||
{
|
{
|
||||||
//
|
$this->configureRateLimiting();
|
||||||
|
|
||||||
parent::boot();
|
$this->routes(function () {
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Define the routes for the application.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function map()
|
|
||||||
{
|
|
||||||
$this->mapApiRoutes();
|
|
||||||
|
|
||||||
$this->mapWebRoutes();
|
|
||||||
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Define the "web" routes for the application.
|
|
||||||
*
|
|
||||||
* These routes all receive session state, CSRF protection, etc.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function mapWebRoutes()
|
|
||||||
{
|
|
||||||
Route::middleware('web')
|
|
||||||
->namespace($this->namespace)
|
|
||||||
->group(base_path('routes/web.php'));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Define the "api" routes for the application.
|
|
||||||
*
|
|
||||||
* These routes are typically stateless.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
protected function mapApiRoutes()
|
|
||||||
{
|
|
||||||
Route::prefix('api')
|
Route::prefix('api')
|
||||||
->middleware('api')
|
->middleware('api')
|
||||||
->namespace($this->namespace)
|
->namespace($this->namespace)
|
||||||
->group(base_path('routes/api.php'));
|
->group(base_path('routes/api.php'));
|
||||||
|
|
||||||
|
Route::middleware('web')
|
||||||
|
->namespace($this->namespace)
|
||||||
|
->group(base_path('routes/web.php'));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configure the rate limiters for the application.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
protected function configureRateLimiting()
|
||||||
|
{
|
||||||
|
RateLimiter::for('api', function (Request $request) {
|
||||||
|
return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip());
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,37 +2,39 @@
|
|||||||
"name": "laravel/laravel",
|
"name": "laravel/laravel",
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"description": "The Laravel Framework.",
|
"description": "The Laravel Framework.",
|
||||||
"keywords": [
|
"keywords": [ "framework", "laravel" ],
|
||||||
"framework",
|
|
||||||
"laravel"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.2",
|
"php": "^7.4|^8.0",
|
||||||
"barryvdh/laravel-snappy": "^0.4.6",
|
"barryvdh/laravel-snappy": "^0.4.6",
|
||||||
"beyondcode/laravel-websockets": "^1.3",
|
"clarkeash/doorman": "^6.0",
|
||||||
"clarkeash/doorman": "^4.0",
|
|
||||||
"doctrine/dbal": "^2.10",
|
"doctrine/dbal": "^2.10",
|
||||||
"eduardokum/laravel-mail-auto-embed": "^1.0",
|
"eduardokum/laravel-mail-auto-embed": "^1.0",
|
||||||
"fideloper/proxy": "^4.0",
|
"fideloper/proxy": "^4.4",
|
||||||
|
"fruitcake/laravel-cors": "^2.0",
|
||||||
|
"guzzlehttp/guzzle": "^7.0.1",
|
||||||
"hmazter/laravel-schedule-list": "^2.1",
|
"hmazter/laravel-schedule-list": "^2.1",
|
||||||
"intervention/image": "^2.5",
|
"intervention/image": "^2.5",
|
||||||
"laravel/framework": "^6.4",
|
"laravel/framework": "^8.12",
|
||||||
"laravel/passport": "^8.2",
|
"laravel/passport": "^10.1",
|
||||||
"laravel/socialite": "^4.2",
|
"laravel/socialite": "^5.2",
|
||||||
"leenooks/laravel": "^6.0",
|
"laravel/ui": "^3.2",
|
||||||
|
"leenooks/laravel": "^9.0",
|
||||||
|
"rennokki/laravel-eloquent-query-cache": "^2.6",
|
||||||
|
"romanzipp/laravel-queue-monitor": "^2.0",
|
||||||
|
"repat/laravel-job-models": "^0.5.1",
|
||||||
"paypal/paypal-checkout-sdk": "^1.0",
|
"paypal/paypal-checkout-sdk": "^1.0",
|
||||||
"spatie/laravel-demo-mode": "^2.5",
|
"spatie/laravel-demo-mode": "^2.5",
|
||||||
"spinen/laravel-quickbooks-client": "^3.1"
|
"spinen/laravel-quickbooks-client": "^4.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"barryvdh/laravel-debugbar": "^3.2",
|
"barryvdh/laravel-debugbar": "^3.5",
|
||||||
"facade/ignition": "1.11.1",
|
"barryvdh/laravel-ide-helper": "^2.10",
|
||||||
"fzaninotto/faker": "^1.4",
|
"facade/ignition": "^2.5",
|
||||||
"laravel/tinker": "^1.0",
|
"fakerphp/faker": "^1.9.1",
|
||||||
"mockery/mockery": "^1.0",
|
"mockery/mockery": "^1.4.2",
|
||||||
"nunomaduro/collision": "^3.0",
|
"nunomaduro/collision": "^5.0",
|
||||||
"phpunit/phpunit": "^8.0"
|
"phpunit/phpunit": "^9.3.3"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"optimize-autoloader": true,
|
"optimize-autoloader": true,
|
||||||
@ -46,12 +48,10 @@
|
|||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"App\\": "app/"
|
"App\\": "app/",
|
||||||
},
|
"Database\\Factories\\": "database/factories/",
|
||||||
"classmap": [
|
"Database\\Seeders\\": "database/seeders/"
|
||||||
"database/seeds",
|
}
|
||||||
"database/factories"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"autoload-dev": {
|
"autoload-dev": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
7168
composer.lock
generated
7168
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@ -210,6 +210,7 @@ return [
|
|||||||
'Config' => Illuminate\Support\Facades\Config::class,
|
'Config' => Illuminate\Support\Facades\Config::class,
|
||||||
'Cookie' => Illuminate\Support\Facades\Cookie::class,
|
'Cookie' => Illuminate\Support\Facades\Cookie::class,
|
||||||
'Crypt' => Illuminate\Support\Facades\Crypt::class,
|
'Crypt' => Illuminate\Support\Facades\Crypt::class,
|
||||||
|
'Date' => Illuminate\Support\Facades\Date::class,
|
||||||
'DB' => Illuminate\Support\Facades\DB::class,
|
'DB' => Illuminate\Support\Facades\DB::class,
|
||||||
'Eloquent' => Illuminate\Database\Eloquent\Model::class,
|
'Eloquent' => Illuminate\Database\Eloquent\Model::class,
|
||||||
'Event' => Illuminate\Support\Facades\Event::class,
|
'Event' => Illuminate\Support\Facades\Event::class,
|
||||||
@ -240,6 +241,7 @@ return [
|
|||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
|
// @todo This needs to move.
|
||||||
'invoice_inadvance'=>30,
|
'invoice_inadvance'=>30,
|
||||||
|
|
||||||
'font' => 'Noto Sans TC',
|
'font' => 'Noto Sans TC',
|
||||||
|
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,
|
||||||
|
|
||||||
|
];
|
@ -44,13 +44,13 @@ return [
|
|||||||
'single' => [
|
'single' => [
|
||||||
'driver' => 'single',
|
'driver' => 'single',
|
||||||
'path' => storage_path('logs/laravel.log'),
|
'path' => storage_path('logs/laravel.log'),
|
||||||
'level' => 'debug',
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
],
|
],
|
||||||
|
|
||||||
'daily' => [
|
'daily' => [
|
||||||
'driver' => 'daily',
|
'driver' => 'daily',
|
||||||
'path' => storage_path('logs/laravel.log'),
|
'path' => storage_path('logs/laravel.log'),
|
||||||
'level' => 'debug',
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
'days' => 14,
|
'days' => 14,
|
||||||
],
|
],
|
||||||
|
|
||||||
@ -59,12 +59,12 @@ return [
|
|||||||
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
||||||
'username' => 'Laravel Log',
|
'username' => 'Laravel Log',
|
||||||
'emoji' => ':boom:',
|
'emoji' => ':boom:',
|
||||||
'level' => 'critical',
|
'level' => env('LOG_LEVEL', 'critical'),
|
||||||
],
|
],
|
||||||
|
|
||||||
'papertrail' => [
|
'papertrail' => [
|
||||||
'driver' => 'monolog',
|
'driver' => 'monolog',
|
||||||
'level' => 'debug',
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
'handler' => SyslogUdpHandler::class,
|
'handler' => SyslogUdpHandler::class,
|
||||||
'handler_with' => [
|
'handler_with' => [
|
||||||
'host' => env('PAPERTRAIL_URL'),
|
'host' => env('PAPERTRAIL_URL'),
|
||||||
@ -74,6 +74,7 @@ return [
|
|||||||
|
|
||||||
'stderr' => [
|
'stderr' => [
|
||||||
'driver' => 'monolog',
|
'driver' => 'monolog',
|
||||||
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
'handler' => StreamHandler::class,
|
'handler' => StreamHandler::class,
|
||||||
'formatter' => env('LOG_STDERR_FORMATTER'),
|
'formatter' => env('LOG_STDERR_FORMATTER'),
|
||||||
'with' => [
|
'with' => [
|
||||||
@ -83,12 +84,12 @@ return [
|
|||||||
|
|
||||||
'syslog' => [
|
'syslog' => [
|
||||||
'driver' => 'syslog',
|
'driver' => 'syslog',
|
||||||
'level' => 'debug',
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
],
|
],
|
||||||
|
|
||||||
'errorlog' => [
|
'errorlog' => [
|
||||||
'driver' => 'errorlog',
|
'driver' => 'errorlog',
|
||||||
'level' => 'debug',
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
],
|
],
|
||||||
|
|
||||||
'null' => [
|
'null' => [
|
||||||
|
28
package.json
28
package.json
@ -2,27 +2,17 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "npm run development",
|
"dev": "npm run development",
|
||||||
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
|
"development": "mix",
|
||||||
"watch": "npm run development -- --watch",
|
"watch": "mix watch",
|
||||||
"watch-poll": "npm run watch -- --watch-poll",
|
"watch-poll": "mix watch -- --watch-options-poll=1000",
|
||||||
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
|
"hot": "mix watch --hot",
|
||||||
"prod": "npm run production",
|
"prod": "npm run production",
|
||||||
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
|
"production": "mix --production"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cross-env": "^5.2.1",
|
"axios": "^0.21",
|
||||||
"laravel-mix": "^5.0.1",
|
"laravel-mix": "^6.0.6",
|
||||||
"resolve-url-loader": "^2.3.1",
|
"lodash": "^4.17.19",
|
||||||
"sass": "^1.15.2",
|
"postcss": "^8.1.14"
|
||||||
"sass-loader": "^8.0.0"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"axios": "^0.19",
|
|
||||||
"bootstrap": "^4.4.1",
|
|
||||||
"jquery": "^3.4.1",
|
|
||||||
"laravel-echo": "^1.6.1",
|
|
||||||
"lodash": "^4.17.13",
|
|
||||||
"popper.js": "^1.16.0",
|
|
||||||
"pusher-js": "^5.0.3"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
RewriteCond %{REQUEST_URI} (.+)/$
|
RewriteCond %{REQUEST_URI} (.+)/$
|
||||||
RewriteRule ^ %1 [L,R=301]
|
RewriteRule ^ %1 [L,R=301]
|
||||||
|
|
||||||
# Handle Front Controller...
|
# Send Requests To Front Controller...
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
RewriteRule ^ index.php [L]
|
RewriteRule ^ index.php [L]
|
||||||
|
12
public/css/adminlte.min.css
vendored
12
public/css/adminlte.min.css
vendored
File diff suppressed because one or more lines are too long
6
public/css/app.css
vendored
6
public/css/app.css
vendored
File diff suppressed because one or more lines are too long
39
public/css/fixes.css
vendored
39
public/css/fixes.css
vendored
@ -1,20 +1,29 @@
|
|||||||
|
body {
|
||||||
|
font-size: 0.85em;
|
||||||
|
}
|
||||||
|
|
||||||
/* Fixes for data tables */
|
/* Fixes for data tables */
|
||||||
|
/* Fix pagination buttons */
|
||||||
.dataTables_wrapper .dataTables_paginate .paginate_button {
|
.dataTables_wrapper .dataTables_paginate .paginate_button {
|
||||||
padding: 0em 0em;
|
padding: 0 0;
|
||||||
margin-left: 0px;
|
margin-left: 0;
|
||||||
border: 0px solid;
|
border: 0 solid;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
|
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
|
||||||
border: 0px solid;
|
border: 0 solid;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dataTables_wrapper .dataTables_paginate .paginate_button:active {
|
.dataTables_wrapper .dataTables_paginate .paginate_button:active {
|
||||||
box-shadow: 0 0 0px #fff;
|
box-shadow: 0 0 0 #fff;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
.dataTables_scrollHeadInner {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Remove multiple sorting images on tables */
|
||||||
table.dataTable thead .sorting_asc {
|
table.dataTable thead .sorting_asc {
|
||||||
background-image: none !important;
|
background-image: none !important;
|
||||||
}
|
}
|
||||||
@ -27,6 +36,12 @@ table.dataTable thead .sorting {
|
|||||||
background-image: none !important;
|
background-image: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Fix textcolor on navbar focus */
|
||||||
|
.form-control.form-control-navbar:focus {
|
||||||
|
color: #111;
|
||||||
|
background-color: white;
|
||||||
|
}
|
||||||
|
|
||||||
/* Remove blue border from chrome on buttons */
|
/* Remove blue border from chrome on buttons */
|
||||||
/* Remove outline for non-keyboard :focus */
|
/* Remove outline for non-keyboard :focus */
|
||||||
*:focus:not(.focus-visible) {
|
*:focus:not(.focus-visible) {
|
||||||
@ -35,9 +50,11 @@ table.dataTable thead .sorting {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Optional: Customize .focus-visible */
|
/* Optional: Customize .focus-visible */
|
||||||
|
/*
|
||||||
.focus-visible {
|
.focus-visible {
|
||||||
outline-color: lightgreen;
|
outline-color: lightgreen;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
*:disabled {
|
*:disabled {
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
@ -51,10 +68,14 @@ table.dataTable thead .sorting {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tag-selected {
|
||||||
|
color: orange;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag-selected:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
.card-header h3.card-title {
|
.card-header h3.card-title {
|
||||||
font-size: 1.0rem;
|
font-size: 1.0rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
|
||||||
font-size: 0.85em;
|
|
||||||
}
|
|
@ -1,23 +1,33 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
use Illuminate\Contracts\Http\Kernel;
|
||||||
* Laravel - A PHP Framework For Web Artisans
|
use Illuminate\Http\Request;
|
||||||
*
|
|
||||||
* @package Laravel
|
|
||||||
* @author Taylor Otwell <taylor@laravel.com>
|
|
||||||
*/
|
|
||||||
|
|
||||||
define('LARAVEL_START', microtime(true));
|
define('LARAVEL_START', microtime(true));
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Check If The Application Is Under Maintenance
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If the application is in maintenance / demo mode via the "down" command
|
||||||
|
| we will load this file so that any pre-rendered content can be shown
|
||||||
|
| instead of starting the framework, which could cause an exception.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (file_exists(__DIR__.'/../storage/framework/maintenance.php')) {
|
||||||
|
require __DIR__.'/../storage/framework/maintenance.php';
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Register The Auto Loader
|
| Register The Auto Loader
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Composer provides a convenient, automatically generated class loader for
|
| Composer provides a convenient, automatically generated class loader for
|
||||||
| our application. We just need to utilize it! We'll simply require it
|
| this application. We just need to utilize it! We'll simply require it
|
||||||
| into the script here so that we don't have to worry about manual
|
| into the script here so we don't need to manually load our classes.
|
||||||
| loading any of our classes later on. It feels great to relax.
|
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -25,36 +35,21 @@ require __DIR__.'/../vendor/autoload.php';
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Turn On The Lights
|
| Run The Application
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| We need to illuminate PHP development, so let us turn on the lights.
|
| Once we have the application, we can handle the incoming request using
|
||||||
| This bootstraps the framework and gets it ready for use, then it
|
| the application's HTTP kernel. Then, we will send the response back
|
||||||
| will load up this application so that we can run it and send
|
| to this client's browser, allowing them to enjoy our application.
|
||||||
| the responses back to the browser and delight our users.
|
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$app = require_once __DIR__.'/../bootstrap/app.php';
|
$app = require_once __DIR__.'/../bootstrap/app.php';
|
||||||
|
|
||||||
/*
|
$kernel = $app->make(Kernel::class);
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Run The Application
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Once we have the application, we can handle the incoming request
|
|
||||||
| through the kernel, and send the associated response back to
|
|
||||||
| the client's browser allowing them to enjoy the creative
|
|
||||||
| and wonderful application we have prepared for them.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
|
$response = tap($kernel->handle(
|
||||||
|
$request = Request::capture()
|
||||||
$response = $kernel->handle(
|
))->send();
|
||||||
$request = Illuminate\Http\Request::capture()
|
|
||||||
);
|
|
||||||
|
|
||||||
$response->send();
|
|
||||||
|
|
||||||
$kernel->terminate($request, $response);
|
$kernel->terminate($request, $response);
|
||||||
|
7
public/js/adminlte.min.js
vendored
7
public/js/adminlte.min.js
vendored
File diff suppressed because one or more lines are too long
2
public/js/app.js
vendored
2
public/js/app.js
vendored
File diff suppressed because one or more lines are too long
@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"/js/app.js": "/js/app.js",
|
|
||||||
"/css/app.css": "/css/app.css"
|
|
||||||
}
|
|
1
public/plugin/bootstrap3-typeahead/js/bootstrap3-typeahead.min.js
vendored
Normal file
1
public/plugin/bootstrap3-typeahead/js/bootstrap3-typeahead.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Before Width: | Height: | Size: 434 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
28
public/web.config
Normal file
28
public/web.config
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<!--
|
||||||
|
Rewrites requires Microsoft URL Rewrite Module for IIS
|
||||||
|
Download: https://www.microsoft.com/en-us/download/details.aspx?id=47337
|
||||||
|
Debug Help: https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/using-failed-request-tracing-to-trace-rewrite-rules
|
||||||
|
-->
|
||||||
|
<configuration>
|
||||||
|
<system.webServer>
|
||||||
|
<rewrite>
|
||||||
|
<rules>
|
||||||
|
<rule name="Imported Rule 1" stopProcessing="true">
|
||||||
|
<match url="^(.*)/$" ignoreCase="false" />
|
||||||
|
<conditions>
|
||||||
|
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
|
||||||
|
</conditions>
|
||||||
|
<action type="Redirect" redirectType="Permanent" url="/{R:1}" />
|
||||||
|
</rule>
|
||||||
|
<rule name="Imported Rule 2" stopProcessing="true">
|
||||||
|
<match url="^" ignoreCase="false" />
|
||||||
|
<conditions>
|
||||||
|
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
|
||||||
|
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
|
||||||
|
</conditions>
|
||||||
|
<action type="Rewrite" url="index.php" />
|
||||||
|
</rule>
|
||||||
|
</rules>
|
||||||
|
</rewrite>
|
||||||
|
</system.webServer>
|
||||||
|
</configuration>
|
23
resources/js/bootstrap.js
vendored
23
resources/js/bootstrap.js
vendored
@ -1,4 +1,3 @@
|
|||||||
window.$ = window.jQuery = require('jquery');
|
|
||||||
window._ = require('lodash');
|
window._ = require('lodash');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -17,19 +16,13 @@ window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
|||||||
* allows your team to easily build robust real-time web applications.
|
* allows your team to easily build robust real-time web applications.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
// import Echo from 'laravel-echo';
|
||||||
import Echo from 'laravel-echo';
|
|
||||||
|
|
||||||
window.Pusher = require('pusher-js');
|
// window.Pusher = require('pusher-js');
|
||||||
|
|
||||||
window.Echo = new Echo({
|
// window.Echo = new Echo({
|
||||||
broadcaster: 'pusher',
|
// broadcaster: 'pusher',
|
||||||
key: process.env.MIX_PUSHER_APP_KEY,
|
// key: process.env.MIX_PUSHER_APP_KEY,
|
||||||
wsHost: window.location.hostname,
|
// cluster: process.env.MIX_PUSHER_APP_CLUSTER,
|
||||||
wsPort: 6001,
|
// forceTLS: true
|
||||||
disableStats: true,
|
// });
|
||||||
encrypted: true,
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
|
|
||||||
require('bootstrap');
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use App\Http\Controllers\{HomeController,WelcomeController};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Web Routes
|
| Web Routes
|
||||||
@ -31,6 +33,7 @@ Route::group(['middleware'=>['theme:adminlte-be','auth','role:wholesaler'],'pref
|
|||||||
Route::get('service/{o}','AdminHomeController@service');
|
Route::get('service/{o}','AdminHomeController@service');
|
||||||
Route::post('service/{o}','AdminHomeController@service_update');
|
Route::post('service/{o}','AdminHomeController@service_update');
|
||||||
Route::get('report/products','Wholesale\ReportController@products');
|
Route::get('report/products','Wholesale\ReportController@products');
|
||||||
|
Route::get('payment/add','PaymentController@add');
|
||||||
|
|
||||||
//Route::get('accounting/connect','AccountingController@connect');
|
//Route::get('accounting/connect','AccountingController@connect');
|
||||||
});
|
});
|
||||||
@ -50,7 +53,7 @@ Route::group(['middleware'=>['theme:adminlte-be','auth','role:reseller'],'prefix
|
|||||||
|
|
||||||
// Our User Routes
|
// Our User Routes
|
||||||
Route::group(['middleware'=>['theme:adminlte-be','auth'],'prefix'=>'u'],function() {
|
Route::group(['middleware'=>['theme:adminlte-be','auth'],'prefix'=>'u'],function() {
|
||||||
Route::get('home','UserHomeController@home');
|
Route::get('home',[HomeController::class,'home']);
|
||||||
Route::get('home/{o}','UserHomeController@home')
|
Route::get('home/{o}','UserHomeController@home')
|
||||||
->where('o','[0-9]+')
|
->where('o','[0-9]+')
|
||||||
->middleware('can:view,o');
|
->middleware('can:view,o');
|
||||||
@ -88,7 +91,7 @@ Route::group(['middleware'=>['theme:adminlte-be'],'prefix'=>'u'],function() {
|
|||||||
|
|
||||||
// Frontend Routes (Non-Authed Users)
|
// Frontend Routes (Non-Authed Users)
|
||||||
Route::group(['middleware'=>['theme:metronic-fe']],function() {
|
Route::group(['middleware'=>['theme:metronic-fe']],function() {
|
||||||
Route::get('/','WelcomeController@index');
|
Route::get('/',[WelcomeController::class,'home']);
|
||||||
Route::get('order','OrderController@index');
|
Route::get('order','OrderController@index');
|
||||||
Route::post('order','OrderController@submit');
|
Route::post('order','OrderController@submit');
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user