blacklist
This commit is contained in:
@@ -23,6 +23,18 @@ class BlacklistController extends Controller
|
||||
$this->middleware('role:User');
|
||||
}
|
||||
|
||||
public function DisplayAddToBlacklist() {
|
||||
return view('blacklist.add');
|
||||
}
|
||||
|
||||
public function DisplayRemoveFromBlacklist() {
|
||||
return view('blacklist.remove');
|
||||
}
|
||||
|
||||
public function DisplaySearch() {
|
||||
return view('blacklist.search');
|
||||
}
|
||||
|
||||
public function AddToBlacklist(Request $request) {
|
||||
//Middleware needed for the function
|
||||
$this->middleware('permission:alliance.recruiter');
|
||||
@@ -61,7 +73,7 @@ class BlacklistController extends Controller
|
||||
}
|
||||
|
||||
//Return the view
|
||||
return view('blacklist.list')->with('success', 'Character added to the blacklist');
|
||||
return redirect('/blacklist/display')->with('success', 'Character added to the blacklist');
|
||||
}
|
||||
|
||||
public function RemoveFromBlacklist(Request $request) {
|
||||
@@ -79,7 +91,7 @@ class BlacklistController extends Controller
|
||||
])->delete();
|
||||
|
||||
//Return the view
|
||||
return view('blacklist.list')->with('success', 'Character removed from the blacklist.');
|
||||
return redirect('/blacklist/display')->with('success', 'Character removed from the blacklist.');
|
||||
}
|
||||
|
||||
public function DisplayBlacklist() {
|
||||
|
||||
12
resources/views/blacklist/search.blade.php
Normal file
12
resources/views/blacklist/search.blade.php
Normal file
@@ -0,0 +1,12 @@
|
||||
@extends('layouts.b4')
|
||||
@section('content')
|
||||
<div class="container">
|
||||
{!! Form::open(['action' => 'Blacklist\BlacklistController@SearchInBlacklist', 'method' => 'POST']) !!}
|
||||
<div class="form-group">
|
||||
{{ Form::label('name', 'Character Name') }}
|
||||
{{ Form::text('name', '', ['class' => 'form-control']) }}
|
||||
</div>
|
||||
{{ Form::submit('Search', ['class' => 'btn btn-primary']) }}
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
@@ -54,6 +54,9 @@ Route::group(['middleware' => ['auth']], function(){
|
||||
* Blacklist Controller display pages
|
||||
*/
|
||||
Route::get('/blacklist/display', 'Blacklist\BlacklistController@DisplayBlacklist');
|
||||
Route::get('/blacklist/display/add', 'Blacklist\BlacklistController@DisplayAddToBlacklist');
|
||||
Route::get('/blacklist/display/remove', 'Blacklist\BlacklistController@DisplayRemoveFromBlacklist');
|
||||
Route::get('/blacklist/display/search', 'Blacklist\BlacklistController@DisplaySearch');
|
||||
Route::post('/blacklist/add', 'Blacklist\BlacklistController@AddToBlacklist');
|
||||
Route::post('/blacklist/remove', 'Blacklist\BlacklistController@RemoveFromBlacklist');
|
||||
Route::post('/blacklist/search', 'Blacklist\BlacklistController@SearchInBlacklist');
|
||||
|
||||
Reference in New Issue
Block a user