Move all front-end templates into a skin folder; override some view calls to accomodate

This commit is contained in:
Nabeel Shahzad
2017-08-01 18:40:05 -05:00
parent aa0629f28d
commit 3f69c412b3
19 changed files with 43 additions and 11 deletions

View File

@@ -20,6 +20,11 @@ class ForgotPasswordController extends Controller
use SendsPasswordResetEmails; use SendsPasswordResetEmails;
public function showLinkRequestForm()
{
return $this->view('auth.passwords.email');
}
/** /**
* Create a new controller instance. * Create a new controller instance.
* *

View File

@@ -27,6 +27,11 @@ class LoginController extends Controller
*/ */
protected $redirectTo = '/home'; protected $redirectTo = '/home';
public function showLoginForm()
{
return $this->view('auth/login');
}
/** /**
* Create a new controller instance. * Create a new controller instance.
* *

View File

@@ -30,6 +30,11 @@ class RegisterController extends Controller
*/ */
protected $redirectTo = '/home'; protected $redirectTo = '/home';
public function showRegistrationForm()
{
return $this->view('auth.register');
}
/** /**
* Create a new controller instance. * Create a new controller instance.
* *

View File

@@ -20,6 +20,13 @@ class ResetPasswordController extends Controller
use ResetsPasswords; use ResetsPasswords;
public function showResetForm(Request $request, $token = null)
{
return $this->view('auth.passwords.reset',
['token' => $token, 'email' => $request->email]
);
}
/** /**
* Create a new controller instance. * Create a new controller instance.
* *

View File

@@ -10,4 +10,10 @@ use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
class Controller extends BaseController class Controller extends BaseController
{ {
use AuthorizesRequests, DispatchesJobs, ValidatesRequests; use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
public function view($template, $vars=[])
{
$tpl = 'layouts/'.config('phpvms.skin').'/'.$template;
return view($tpl, $vars);
}
} }

View File

@@ -6,5 +6,5 @@ use App\Http\Controllers\AppBaseController;
class BaseController extends AppBaseController class BaseController extends AppBaseController
{ {
} }

View File

@@ -11,10 +11,10 @@ class DashboardController extends BaseController
*/ */
public function index() public function index()
{ {
return view('frontend.dashboard'); return $this->view('frontend/dashboard');
} }
public function test() public function test()
{ {
return view('frontend.dashboard'); return $this->view('frontend/dashboard');
} }
} }

View File

@@ -2,9 +2,8 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use Illuminate\Http\Request;
class HomeController extends Controller class HomeController extends AppBaseController
{ {
/** /**
* Show the application dashboard. * Show the application dashboard.
@@ -12,6 +11,6 @@ class HomeController extends Controller
*/ */
public function index() public function index()
{ {
return view('home'); return $this->view('home');
} }
} }

View File

@@ -11,6 +11,11 @@
return [ return [
/**
* The skin to use for the front-end
*/
'skin' => 'default',
/** /**
* Start date. Set the date of when your VA has started * Start date. Set the date of when your VA has started
* Used as an anchor point for some financials and things * Used as an anchor point for some financials and things

View File

@@ -1,4 +1,4 @@
@extends('auth.layout') @extends('layouts.default.auth.layout')
@section('content') @section('content')
<div class="col-md-4 content-center"> <div class="col-md-4 content-center">

View File

@@ -1,4 +1,4 @@
@extends('layouts.app') @extends('layouts.default.app')
@section('content') @section('content')
<div class="container"> <div class="container">

View File

@@ -1,4 +1,4 @@
@extends('layouts.app') @extends('layouts.default.app')
<!-- Main Content --> <!-- Main Content -->
@section('content') @section('content')

View File

@@ -1,4 +1,4 @@
@extends('layouts.app') @extends('layouts.default.app')
@section('content') @section('content')
<div class="container"> <div class="container">

View File

@@ -1,4 +1,4 @@
@extends('auth.layout') @extends('layouts.default.auth.layout')
@section('content') @section('content')