styling
This commit is contained in:
20
app/Http/Controllers/Dashboard/DashboardController.php
Normal file
20
app/Http/Controllers/Dashboard/DashboardController.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Dashboard;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class DashboardController extends Controller
|
||||
{
|
||||
public function __construct() {
|
||||
$this->middleware('role:Uesr');
|
||||
}
|
||||
|
||||
public function index() {
|
||||
return redirect('/');
|
||||
}
|
||||
|
||||
public function profile() {
|
||||
return redirect('/');
|
||||
}
|
||||
}
|
||||
@@ -15,8 +15,7 @@ use App\Library\Hauling\HaulingHelper;
|
||||
class HaulingController extends Controller
|
||||
{
|
||||
public function __construct() {
|
||||
$this->middleware('auth');
|
||||
$this->middleware('role:Guest');
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -14,8 +14,10 @@ class Authenticate extends Middleware
|
||||
*/
|
||||
protected function redirectTo($request)
|
||||
{
|
||||
if (! $request->expectsJson()) {
|
||||
return route('login');
|
||||
if($this->auth->check()) {
|
||||
return route('/');
|
||||
} else {
|
||||
return route('/');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,9 +4,18 @@ namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Socialite;
|
||||
use DB;
|
||||
|
||||
use App\Models\User\User;
|
||||
use Seat\Eseye\Cache\NullCache;
|
||||
use Seat\Eseye\Configuration;
|
||||
use Seat\Eseye\Containers\EsiAuthentication;
|
||||
use Seat\Eseye\Eseye;
|
||||
|
||||
class RedirectIfAuthenticated
|
||||
{
|
||||
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
@@ -18,9 +27,8 @@ class RedirectIfAuthenticated
|
||||
public function handle($request, Closure $next, $guard = null)
|
||||
{
|
||||
if (Auth::guard($guard)->check()) {
|
||||
return redirect('/home');
|
||||
return redirect()->to('/dashboard');
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@
|
||||
"laravel/framework": "^6.0",
|
||||
"laravel/socialite": "^4.2",
|
||||
"laravel/tinker": "^1.0",
|
||||
"laravelcollective/html": "^6.0",
|
||||
"twbs/bootstrap": "^4.3"
|
||||
},
|
||||
"require-dev": {
|
||||
|
||||
72
composer.lock
generated
72
composer.lock
generated
@@ -4,7 +4,11 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
<<<<<<< HEAD
|
||||
"content-hash": "f7d6457916d37f9d2351ce632fc5dd35",
|
||||
=======
|
||||
"content-hash": "5fb9de1acc8a170ba905235ac9fda870",
|
||||
>>>>>>> c55f404a504fc5daf976929df5f96b2bc8421ec1
|
||||
"packages": [
|
||||
{
|
||||
"name": "dnoegel/php-xdg-base-dir",
|
||||
@@ -978,6 +982,74 @@
|
||||
],
|
||||
"time": "2019-08-07T15:10:45+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravelcollective/html",
|
||||
"version": "v6.0.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/LaravelCollective/html.git",
|
||||
"reference": "2f181aba73390eec13d398bf57877b1cc3bc2588"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/LaravelCollective/html/zipball/2f181aba73390eec13d398bf57877b1cc3bc2588",
|
||||
"reference": "2f181aba73390eec13d398bf57877b1cc3bc2588",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/http": "6.0.*",
|
||||
"illuminate/routing": "6.0.*",
|
||||
"illuminate/session": "6.0.*",
|
||||
"illuminate/support": "6.0.*",
|
||||
"illuminate/view": "6.0.*",
|
||||
"php": ">=7.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"illuminate/database": "6.0.*",
|
||||
"mockery/mockery": "~1.0",
|
||||
"phpunit/phpunit": "~7.1"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "6.0-dev"
|
||||
},
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Collective\\Html\\HtmlServiceProvider"
|
||||
],
|
||||
"aliases": {
|
||||
"Form": "Collective\\Html\\FormFacade",
|
||||
"Html": "Collective\\Html\\HtmlFacade"
|
||||
}
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Collective\\Html\\": "src/"
|
||||
},
|
||||
"files": [
|
||||
"src/helpers.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Adam Engebretson",
|
||||
"email": "adam@laravelcollective.com"
|
||||
},
|
||||
{
|
||||
"name": "Taylor Otwell",
|
||||
"email": "taylorotwell@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "HTML and Form Builders for the Laravel Framework",
|
||||
"homepage": "https://laravelcollective.com",
|
||||
"time": "2019-09-23T06:16:50+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/flysystem",
|
||||
"version": "1.0.55",
|
||||
|
||||
@@ -17,7 +17,7 @@ class CreateUsersTable extends Migration
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name');
|
||||
$table->integer('character_id')->unsigned()->unique();
|
||||
$table->unsignedInteger('character_id')->unique();
|
||||
$table->string('avatar');
|
||||
$table->string('access_token')->nullable();
|
||||
$table->string('refresh_token')->nullable();
|
||||
@@ -32,7 +32,7 @@ class CreateUsersTable extends Migration
|
||||
if(!Schema::hasTable('user_roles')) {
|
||||
Schema::create('user_roles', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('character_id')->unsigned();
|
||||
$table->unsignedInteger('character_id');
|
||||
$table->foreign('character_id')->references('character_id')->on('users');
|
||||
$table->string('role')->default('None');
|
||||
$table->timestamps();
|
||||
@@ -42,7 +42,7 @@ class CreateUsersTable extends Migration
|
||||
if(!Schema::hasTable('esi_tokens')) {
|
||||
Schema::create('esi_tokens', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('character_id')->unique();
|
||||
$table->unsignedInteger('character_id')->unique();
|
||||
$table->foreign('character_id')->references('character_id')->on('users');
|
||||
$table->string('access_token');
|
||||
$table->string('refresh_token');
|
||||
@@ -54,7 +54,7 @@ class CreateUsersTable extends Migration
|
||||
if(!Schema::hasTable('esi_scopes')) {
|
||||
Schema::create('esi_scopes', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('character_id');
|
||||
$table->unsignedInteger('character_id');
|
||||
$table->foreign('character_id')->references('character_id')->on('users');
|
||||
$table->string('scope');
|
||||
$table->timestamps();
|
||||
@@ -64,7 +64,7 @@ class CreateUsersTable extends Migration
|
||||
if(!Schema::hasTable('user_permissions')) {
|
||||
Schema::create('user_permissions', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('character_id')->unisnged();
|
||||
$table->unsignedInteger('character_id');
|
||||
$table->foreign('character_id')->references('character_id')->on('users');
|
||||
$table->string('permission');
|
||||
$table->timestamps();
|
||||
@@ -86,6 +86,11 @@ class CreateUsersTable extends Migration
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
DB::table('available_user_roles')->insert([
|
||||
'role' => 'None',
|
||||
'description' => 'No roles whatsoever on the site.',
|
||||
]);
|
||||
|
||||
DB::table('available_user_roles')->insert([
|
||||
'role' => 'Guest',
|
||||
'description' => 'Guest of the site.',
|
||||
|
||||
@@ -4,7 +4,7 @@ use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class NewLookupTables extends Migration
|
||||
class CreateLookupTables extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
|
||||
@@ -34,7 +34,7 @@ class SolarSystemSeeder extends Seeder
|
||||
|
||||
}
|
||||
|
||||
$count = SolarSystem::where(['system_id' => $system])->count();
|
||||
$count = SolarSystem::where(['solar_system_id' => $system])->count();
|
||||
if($count == 0) {
|
||||
SolarSystem::insert([
|
||||
'name' => $info->name,
|
||||
|
||||
1
resources/views/hauling/display/test.blade.php
Normal file
1
resources/views/hauling/display/test.blade.php
Normal file
@@ -0,0 +1 @@
|
||||
This is a test
|
||||
@@ -3,7 +3,7 @@
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="/dashboard">United Hauling</a>
|
||||
<a class="navbar-brand" href="/">United Hauling</a>
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdoownMenuLink" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Hauling</a>
|
||||
|
||||
@@ -11,19 +11,19 @@
|
||||
|
|
||||
*/
|
||||
|
||||
Route::get('/', function () {
|
||||
if(Auth::check()) {
|
||||
return redirect('/dashboard');
|
||||
}
|
||||
return redirect('/display');
|
||||
})->name('/');
|
||||
/**
|
||||
* Unsecure Display pages
|
||||
*/
|
||||
Route::get('/', 'Hauling\HaulingController@displayForm')->name('/');
|
||||
Route::post('/', 'Hauling\HaulingController@displayFormResults');
|
||||
Route::get('/display/quotes', 'Hauling\HaulingController@displayQuotes')->name('quotes');
|
||||
|
||||
Route::group(['middleware' => ['auth']], function(){
|
||||
/**
|
||||
* Dashboard Controller Display pages
|
||||
*/
|
||||
Route::get('/dashboard', 'Dashboard\DashboardController@index');
|
||||
Route::get('/profile', 'Dashboard\DashboardController@profile');
|
||||
//Route::get('/dashboard', 'Dashboard\DashboardController@index');
|
||||
//Route::get('/profile', 'Dashboard\DashboardController@profile');
|
||||
|
||||
});
|
||||
|
||||
@@ -37,10 +37,3 @@ Route::group(['middleware' => ['guest']], function() {
|
||||
Route::get('/login', 'Auth\LoginController@redirectToProvider')->name('login');
|
||||
Route::get('/callback', 'Auth\LoginController@handleProviderCallback')->name('callback');
|
||||
Route::get('/logout', 'Auth\LoginController@logout')->name('logout');
|
||||
|
||||
/**
|
||||
* Unsecure Display pages
|
||||
*/
|
||||
Route::get('/display', 'Hauling\HaulingController@displayForm')->name('display');
|
||||
Route::post('/display', 'Hauling\HaulingController@displayFormResults');
|
||||
Route::get('/display/quotes', 'Hauling\HaulingController@displayQuotes')->name('quotes');
|
||||
|
||||
Reference in New Issue
Block a user