Laravel Routing

Routing means the page that you have called for a url. Will call the same page. The url of the application is defined in the routes/web.php file. Now you can understand by example how you call a page with the help of web.php, we can see the page’s output.


Route::get('/', function () {
   return view('welcome');

To get any page or use the get method to get values ​​from the database.
The use value of the post method is used to save in the database.

So come first learn how to use get method how to call any html and php file.

Step:1- First of all, write this code in web.php.

Route::get('/', function () {
   return view('welcome');

Step:2-Now after that you have to create a file named resources/view/welcome.blade.php as you have written it, after going to the resources directory, after you open the view folder, you can create your own file in it. Whatever php file is created in Laravel, it is created from blade.php extension like index.blade.php


      <link href = "" rel = "stylesheet" 
         type = "text/css">
      <div class = "container">
         <div class = "content">
            <div class = "title">Laravel 5.3</div>
            <p>My Name Is Jyoti</p>

After creating the welcome.blade.php file, you can run your file on your localserver to run
localhost/projectfoldername/public/ If you run this way, your index file will open and you will get the output.