Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- Route::pattern('nama', '[A-Za-z]+');
- /*
- |--------------------------------------------------------------------------
- | Application Routes
- |--------------------------------------------------------------------------
- |
- | Here is where you can register all of the routes for an application.
- | It's a breeze. Simply tell Laravel the URIs it should respond to
- | and give it the controller to call when that URI is requested.
- |
- */
- Route::get('/', function () {
- return view('welcome');
- });
- // Route::post('kontak-post', function() {
- // return 'Anda mengirim pesan "' . $_POST['pesan'] . '"';
- // });
- // Route::match(['get', 'post'], 'kontak', function() {
- // $html = '<h1>halaman kontak</h1>';
- // if (isset($_REQUEST['pesan'])) {
- // $html .= 'Anda mengirim pesan ' . $_REQUEST['pesan'];
- // }
- // return $html;
- // });
- // Route::get('welcome/{nama?}', ['as'=>'home.welcome', function($nama = 'Pengunjung') {
- // return "Selamat datang " . $nama . ". Anda luar biasa!";
- // }]);
- Route::group(['middleware' => 'web'], function(){
- Route::auth();
- Route::get('/home', 'HomeController@index');
- Route::resource('categories', 'CategoriesController');
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement