Search
 
SCRIPT & CODE EXAMPLE
 

PHP

how to give optional parameter in route

Route::get('demo/{name?}',function ($name = null) {
    $demo = '<h2>Demo</h2>';
    $data = compact('name','demo');
    return view('welcome')->with($data);
});
Comment

PREVIOUS NEXT
Code Example
Php :: laravel image store 
Php :: how to send mail in laravel 
Php :: Carbon Add Years To Date In Laravel 
Php :: checkbox options wordpress 
Php :: get user auth in laravel 
Php :: laravel permissions 
Php :: The media must not be greater than 12288 kilobytes in laravel 
Php :: sql update row in php 
Php :: php include external directory path 
Php :: why we use .htaccess file in php 
Php :: php append n time pattern to string 
Php :: database seeder laravel 
Php :: how to upgrade php in mac mojave 
Php :: laravel outer join 
Php :: php unit 
Php :: laravel Auth::logoutOtherDevices 
Php :: laravel observer get old value 
Php :: laravel eloquent bulk insert 
Php :: symfony connect rabbitMQ 
Php :: artisan laravel require bootstrap 
Php :: php count days excluding weekends 
Php :: laravel simplexmlelement not found 
Php :: php function to remove 0 value from array 
Php :: convert php array to javascript json laravel 
Php :: php command get ini params 
Php :: Laravel Migration - Update Enum Options 
Php :: How To Force Redirect HTTP To HTTPS In Laravel Using ServiceProvider 
Php :: php string literal 
Php :: woocommerce update_status 
Php :: integer data type php 
ADD CONTENT
Topic
Content
Source link
Name
8+5 =