re-arranging moon stuff in the correct controller
This commit is contained in:
@@ -29,17 +29,7 @@ class DashboardController extends Controller
|
||||
return view('dashboard');
|
||||
}
|
||||
|
||||
public function addMoon() {
|
||||
return view('dashboard.addmoon');
|
||||
}
|
||||
|
||||
public function profile() {
|
||||
//
|
||||
}
|
||||
|
||||
public function displayMoons() {
|
||||
$moons = DB::table('moons')->get();
|
||||
|
||||
return 'Moons Display Table';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,12 +11,22 @@ use Seat\Eseye\Eseye;
|
||||
|
||||
class MoonsController extends Controller
|
||||
{
|
||||
public function displayMoons() {
|
||||
$moons = DB::table('moons')->get();
|
||||
|
||||
return view('dashboard.moon.moon')->with('moons', $moons);
|
||||
}
|
||||
|
||||
public function addMoon() {
|
||||
return view('dashboard.addmoon');
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new moon into the database
|
||||
*
|
||||
* @return \Illuminate\Http\Reponse
|
||||
*/
|
||||
public function addMoon(Request $request) {
|
||||
public function storeMoon(Request $request) {
|
||||
$this->validate($request, [
|
||||
'region' => 'required',
|
||||
'system' => 'required',
|
||||
@@ -72,5 +82,6 @@ class MoonsController extends Controller
|
||||
// Instantiate a new ESI instance.
|
||||
$esi = new Eseye($authentication);
|
||||
|
||||
return 'Work In Progress!';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
@extends('layouts.b4')
|
||||
|
||||
@section('content')
|
||||
<h2>Add A New Moon</h2>
|
||||
{!! Form::open(['action' => 'MoonsController@storeMoon', 'method' => 'POST']) !!}
|
||||
<div class="form-group">
|
||||
{{ Form::label('region', 'Region') }}
|
||||
{{ Form::text('region', '', ['class' => 'form-control', 'placeholder' => 'Region']) }}
|
||||
</div>
|
||||
{{ Form::submit('Submit', ['class' => 'btn btn-primary']) }}
|
||||
{!! Form::close() !!}
|
||||
@endsection
|
||||
@@ -16,17 +16,15 @@ Route::get('/', function () {
|
||||
});
|
||||
|
||||
Auth::routes();
|
||||
|
||||
//Login display pages
|
||||
Route::get('/login', 'Auth\LoginController@redirectToProvider');
|
||||
Route::get('/callback', 'Auth\LoginController@handleProviderCallback');
|
||||
|
||||
//Dashboard Controller Display pages
|
||||
Route::get('/dashboard', 'DashboardController@index');
|
||||
Route::get('/dashboard/addmoon', 'DashboardController@addMoon');
|
||||
Route::get('/dashboard/updatemoon', 'DashboardController@updateMoon');
|
||||
Route::get('/dashboard/moons', 'DashboardController@displayMoons');
|
||||
Route::get('/dashboard/profile', 'DashboardController@profile');
|
||||
//Route::get('/callback', 'DashboardController@callback');
|
||||
Route::get('/dashboard/moonmine/display', 'MoonsController@moonminedisplay');
|
||||
Route::post('moonmine', 'MoonsController@moonmine');
|
||||
|
||||
//Moon Controller display pages
|
||||
Route::get('/moons/display', 'MoonsController@displayMoons');
|
||||
Route::get('/moons/addmoon', 'MoonsController@addMoon');
|
||||
Route::get('/moons/updatemoon', 'MoonsController@updateMoon');
|
||||
//Moon Controller POSTS requests
|
||||
Route::post('moons', 'MoonsController@addMoon');
|
||||
|
||||
Reference in New Issue
Block a user