Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- Route::get('about', function(){
- $halaman='about';
- return view('chapter5.about', compact('halaman'));
- });
- Route::get('/dashboard','AdminController@index');
- //chapter5
- Route::get('/','HomeController@index');
- Route::get('/about','AboutController@index');
- //---------------------------
- Route::group(['middleware'=>['web']], function(){
- Route::get('karyawan','KaryawanController@index');
- Route::get('karyawan/create','KaryawanController@create');
- Route::get('karyawan/{karyawan}','KaryawanController@show');
- Route::post('karyawan','KaryawanController@store');
- Route::get('karyawan/{karyawan}/edit','KaryawanController@edit');
- Route::patch('karyawan/{karyawan}','KaryawanController@update');
- Route::delete('karyawan/{karyawan}','KaryawanController@destroy');
- Route::get('caridata','KaryawanController@search');
- });
- //---------------------------
- //Route::get('/karyawan','KaryawanC5Controller@index');
- Route::get('sampledata',function(){
- DB::table('employes')->insert([
- [
- 'nama' => 'zaid',
- 'nip'=>'1001',
- 'tgl_lahir'=>'1990-01-22',
- 'gender'=>'L',
- 'created_at' => '2017-04-24 21:18',
- 'updated_at' => '2017-04-24 21:18'
- ],
- [
- 'nama' => 'Hindun',
- 'nip'=>'1002',
- 'tgl_lahir'=>'1998-01-22',
- 'gender'=>'P',
- 'created_at'=>'2017-04-24 21:19',
- 'updated_at'=>'2017-04-24 21:20'
- ],
- [
- 'nama' => 'Michan',
- 'nip'=>'1003',
- 'tgl_lahir'=>'1996-05-21',
- 'gender'=>'L',
- 'created_at'=>'2017-04-24 21:19',
- 'updated_at'=>'2017-04-24 21:20'
- ]
- ]);
- });
Advertisement
Add Comment
Please, Sign In to add comment