Removed redundant items, upgraded to laravel 5.6

This commit is contained in:
Deon George
2018-04-10 21:23:13 +10:00
parent 33658e37a3
commit f9e3b2927a
588 changed files with 35299 additions and 90438 deletions

View File

@@ -36,11 +36,4 @@ class LoginController extends Controller
{
$this->middleware('guest')->except('logout');
}
public function showLoginForm()
{
return view('auth.login',[
'site_social'=>[['name'=>'facebook','url'=>'#'],['name'=>'twitter','url'=>'#']],
]);
}
}

View File

@@ -4,6 +4,7 @@ namespace App\Http\Controllers\Auth;
use App\User;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
use Illuminate\Foundation\Auth\RegistersUsers;
@@ -51,6 +52,9 @@ class RegisterController extends Controller
'name' => 'required|string|max:255',
'email' => 'required|string|email|max:255|unique:users',
'password' => 'required|string|min:6|confirmed',
'token' => 'required|doorman:email',
'password' => 'required|min:6|confirmed',
'terms' => 'required',
]);
}
@@ -62,10 +66,25 @@ class RegisterController extends Controller
*/
protected function create(array $data)
{
return User::create([
$fields = [
'name' => $data['name'],
'email' => $data['email'],
'password' => bcrypt($data['password']),
]);
'password' => Hash::make($data['password']),
];
if (config('auth.providers.users.field','email') === 'username' && isset($data['username'])) {
$fields['username'] = $data['username'];
}
try {
Doorman::redeem($data['token'],$data['email']);
// @todo Want to direct or display an appropriate error message (although the form validation does it anyway).
} catch (DoormanException $e) {
redirect('/error');
abort(403);
}
return User::create($fields);
}
}

View File

@@ -1,32 +0,0 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class HomeController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
// $this->middleware('subscribed');
}
/**
* Show the application dashboard.
*
* @return Response
*/
public function show()
{
return view('home',[
'page_title'=>'Dashboard',
]);
}
}

View File

@@ -1,139 +0,0 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Support\Facades\Cache;
use Lipsum;
class WelcomeController extends Controller
{
private $cachetime = 86400;
private function _sample_data() {
return [
'site_aboutus'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(3); }),
'site_address'=>'1 Road Street,<br>Town or City, State, Postcode<br>Country',
'site_description'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(1); }),
'site_email'=>'sales@example.com',
'site_fax'=>'+1 234 567 8910',
'site_logo'=>'/image/generic/150/20/fff',
'site_phone'=>'+1 234 567 8910',
'site_slider'=>TRUE,
'site_social'=>[['name'=>'facebook','url'=>'#'],['name'=>'twitter','url'=>'#']],
'site_topmenu'=>['Option1'=>['url'=>'#','name'=>'a'],'Option 2'=>['url'=>'#','name'=>'List','children'=>[['url'=>'#','name'=>'A'],['url'=>'#','name'=>'B']]]],
'page_activity'=>[
[
'image_small'=>'/image/generic/150/100/fff',
'image_large'=>'/image/generic/450/200/aaa',
'title'=>'Title',
'subtitle'=>'Subtitle',
],
[
'image_small'=>'/image/generic/150/100/eee',
'image_large'=>'/image/generic/650/200/999',
'title'=>'Title',
'subtitle'=>'Subtitle',
],
[
'image_small'=>'/image/generic/150/100/ddd',
'image_large'=>'/image/generic/850/300/888',
'title'=>'Title',
'subtitle'=>'Subtitle',
],
[
'image_small'=>'/image/generic/150/100/ccc',
'image_large'=>'/image/generic/450/200/777',
'title'=>'Title',
'subtitle'=>'Subtitle',
],
],
'page_activityintro'=>'Here are some of the the things we\'ve been doing',
'page_blockquote'=>[
[
'title'=>'Block Quote',
'icon'=>'fa fa-rocket',
'image'=>'/image/generic/150/75/ddd',
],
],
'page_servicebox'=>[
[
'title'=>'Box 1',
'icon'=>'fa fa-location-arrow blue',
'image'=>'/image/generic/200/100/999',
'text'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(3); }),
],
[
'title'=>'Box 2',
'icon'=>'fa fa-location-arrow blue',
'image'=>'/image/generic/200/100/999',
'text'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(3); }),
],
[
'title'=>'Box 3',
'icon'=>'fa fa-location-arrow blue',
'image'=>'/image/generic/200/100/999',
'text'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(3); }),
],
],
'page_steps'=>[
[
'title'=>'Step 1',
'description'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(1); }),
],
[
'title'=>'Step 2',
'description'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(1); }),
],
[
'title'=>'Step 3',
'description'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(1); }),
],
],
'page_tabs'=>[
[
'title'=>'Title #1',
'image'=>'/image/generic/200/100/999/1.jpg',
'text'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(1); }),
],
[
'title'=>'Title #2',
'image'=>'/image/generic/200/100/999/1.jpg',
'text'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(1); }),
],
[
'title'=>'Title #3',
'image'=>'/image/generic/200/100/999/1.jpg',
'text'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(1); }),
],
],
'page_testimonials'=>[
[
'name'=>'First Last #1',
'title'=>'Title',
'photo'=>'/image/generic/200/100/999',
'quote'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(1); }),
],
[
'name'=>'First Last #2',
'title'=>'Title',
'photo'=>'/image/generic/200/100/333',
'quote'=>Cache::remember(md5(__METHOD__.'aboutus'),$this->cachetime,function() { return Lipsum::short()->text(1); }),
],
],
'page_title'=>'Welcome',
];
}
/**
* Show the application splash screen.
*
* @return Response
*/
public function show()
{
return view('welcome',$this->_sample_data());
}
}