Commit bf8c826a by Rinto

new

parent 0c354c2a
......@@ -16,24 +16,25 @@ use App\Models\Jadwal;
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('/',function(){
return view('index');
return view('index');
})->middleware('guest');
// Routing untuk authentifikasi
Route::group(['namespace' => 'auth'],function(){
Route::post('/login','LoginController@login')->name('login');
Route::post('/login','LoginController@login')->name('login');
Route::get('/logout',function(){
Auth::logout();
return redirect('/');
})->name('logout');
Route::get('/register','RegisterController@store');
Route::post('/register','RegisterController@store');
});
Route::group(['prefix' => 'admin','middleware' => 'admin'], function() {
Route::get('/', function () {
$this->data['title'] = 'Dashboard';
$this->data['title'] = 'Dashboard';
return view('admin.index',$this->data);
});
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