how to call a file that is define in routes
routing types
Basic routeing
redirect routes
view routes
route parameters
named routes
without using controller
use route::view
routes/api.php-> api path
routes/web.php -> web application
we cwill give for every route with name, that name we will call in entire application
routes/console.php
routes/channels.php
route::get
route::post
in above u observer named routes
redirect from entered to named or defned
router:redirect('/here','/greeting');
route with parameters
Route::view('/about', 'ui.about',['car' =>'my favorite car']);
<?php echo $car ?> == {{ $car}}
rote::get('/'.function(){
return view('welcme');
});
route::any
rote::get('/'.function(){
return view('welcme');
});
named routes and route paramaters
url/user/vamsi/krishna
{{$first_name}}
php artisan route:cache
laravel routing assignment
By which file route files are loaded automatically?
riute service provider
Which method is used to register a route that responds to multiple specific HTTP verbs?
match
Which status code is returned by Route::redirect method by default?
302
No comments:
Post a Comment