Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- |--------------------------------------------------------------------------
- | Web Routes
- |--------------------------------------------------------------------------
- |
- | Here is where you can register web routes for your application. These
- | routes are loaded by the RouteServiceProvider within a group which
- | contains the "web" middleware group. Now create something great!
- |
- */
- Route::get('/', function () {
- return view('chap5.home');
- });
- Route::get('about', function () {
- $halaman='about';
- return view('chap5.about', compact('halaman'));
- });
- /*
- Route::get('karyawan',function(){
- $halaman='karyawan';
- $karyawan=['Munawar', 'Budi Santoso', 'Widya Ningrum', 'Unggul Jaya'];
- return view('chap5.karyawan', compact('halaman','karyawan'));
- });
- */
- //Route::get('about', 'BelajarController@index');
- Route::get('/Projek1', 'Projek1Controller@index');
- Route::post('/Projek1/auth', 'Projek1Controller@auth');
- Route::get('/Latihan', 'LatihanController@index');
- Route::get('sampeldata',function(){
- DB::table('employes')->insert([
- [
- 'nama' => 'Zaid',
- 'nip' => '10001',
- 'tgl_lahir' => '1990-01-22',
- 'gender' => 'L',
- 'created_at' => '2017-04-24 21:18',
- 'updated_at' => '2017-04-24 21:18'
- ],
- [
- 'nama' => 'Hindun',
- 'nip' => '10002',
- 'tgl_lahir' => '1988-01-22',
- 'gender' => 'P',
- 'created_at' => '2017-04-24 21:19',
- 'updated_at' => '2017-04-24 21:19'
- ],
- [
- 'nama' => 'Rizal',
- 'nip' => '14090013',
- 'tgl_lahir' => '1996-04-17',
- 'gender' => 'L',
- 'created_at' => '2017-04-24 21:18',
- 'updated_at' => '2017-04-24 21:18'
- ],
- ]);
- });
- 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('caridata','KaryawanController@cari');
- Route::get('karyawan/{karyawan}/edit', 'KaryawanController@edit');
- Route::patch('karyawan/{karyawan}', 'KaryawanController@update');
- Route::delete('karyawan/{karyawan}', 'KaryawanController@destroy');
- });
Add Comment
Please, Sign In to add comment