Skip to content

DataOps Blog

Just another DataOps site

  • Home
  • certification
  • consultant
  • consulting
  • Contact Us!
  • courses
  • Intro to Laravel
  • tools
  • trainer
  • training

LARAVEL ROUTING

January 6, 2022
By Subham Kumar Mishra In Laravel

LARAVEL ROUTING

All Laravel routes are define in route files , which are located in the route directory ,These file are automatically loaded by the framework.

The most basic Laravel routes accept a URI and a closure, providing a very simple and expressive method of defining routes and behavior without complicated routing configuration files:

Basic Routes

Syntax:-

Route::get(‘URI’,closer/callback);

Ex :-

Route::get(‘/about’,function()

{

return “hello world”;

});

Routes Parameter

Syntax :-

Route::get(‘uri/{parameter}’,function($para)

{

return $para;

});

Example

Route::get(‘user/{user_id}’,function($user_id)

{

return $user_id;

});

Multiple Parameter Routes

syntax :-

Route::get(‘uri/{parameter}/uri/{para}’, function($parameter, $para)

{

return $parameter $para;

});

Example:-

Route::get(‘user_name/{U_name}/user_id/{U_id}’,function($name $id)

{

return $name $id;

});

Redirect Routes

Syntax:-

Route::redirect(‘from’,’to’);

Example:-

Route::redirect(‘login’,’dashboard’);

Thanku

Laravel
Written by:

Subham Kumar Mishra

View All Posts

Recent Posts

  • The Online Dating Association (ODA) Maintains the Gold Standard for online dating sites in britain
  • Tips Balance On The Internet And Typical Dating
  • meet black gay men Gay Hookups
  • (no title)
  • (no title)
  • Online Casinos Offer No Deposit Casino Bonus Codes
  • A Board Website Review
  • How you can Remove Disease From ipad device
  • Dating – When You Should Discuss Dirty Little Methods?
  • How to Find the Top Canadian Online Casino
  • Research Papers For Sale
  • Free Slot Machine Games – Tips to Play Slots Free
  • (no title)
  • Why Use a VPN Online?
  • The very best GTA Games
  • DesignLab Xbox 360 – Create Your Very Own Controllers
  • Tips on how to Conduct Individual Businesses
  • Tips on how to Download the Best Android Programs
  • Finest Antivirus Totally free
  • VPN USA — Protect Your web Privacy and Unblock Geo-Restricted Content

Archives

Categories

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
  • Free Video Tutorials
  • DevOps School
  • Best DevOps
  • scmGalaxy
  • Artificial Intelligence
  • DataOps
  • AIOps
  • GuruKul Galaxy
  • DevOps Consulting
  • DevOps Freelancers
  • DevOps Trainer
  • Free Ebooks
  • School for Debugger
  • Holiday Landmark
  • Surgery Planet
  • My Hospital Now
  • My Medic Plus
  • ProfessNow
  • Cotocus
  • Stocks Mantra
  • I Reviewed

Proudly powered by WordPress | Theme: BusiCare by SpiceThemes