Commit bf8c826a by Rinto

new

parent 0c354c2a
...@@ -16,24 +16,25 @@ use App\Models\Jadwal; ...@@ -16,24 +16,25 @@ use App\Models\Jadwal;
| contains the "web" middleware group. Now create something great! | contains the "web" middleware group. Now create something great!
| |
*/ */
Route::get('/',function(){ Route::get('/',function(){
return view('index'); return view('index');
})->middleware('guest'); })->middleware('guest');
// Routing untuk authentifikasi // Routing untuk authentifikasi
Route::group(['namespace' => 'auth'],function(){ Route::group(['namespace' => 'auth'],function(){
Route::post('/login','LoginController@login')->name('login'); Route::post('/login','LoginController@login')->name('login');
Route::get('/logout',function(){ Route::get('/logout',function(){
Auth::logout(); Auth::logout();
return redirect('/'); return redirect('/');
})->name('logout'); })->name('logout');
Route::get('/register','RegisterController@store'); Route::post('/register','RegisterController@store');
}); });
Route::group(['prefix' => 'admin','middleware' => 'admin'], function() { Route::group(['prefix' => 'admin','middleware' => 'admin'], function() {
Route::get('/', function () { Route::get('/', function () {
$this->data['title'] = 'Dashboard'; $this->data['title'] = 'Dashboard';
return view('admin.index',$this->data); return view('admin.index',$this->data);
}); });
Route::resource('admin','AdminController'); Route::resource('admin','AdminController');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment