Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 257 Vote(s) - 3.51 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Laravel Tutorial 1: Intro to Routing

#1
In the previous tutorial we installed Laravel and got it up and running. In this tutorial we will cover Routing in laravel. Don't forget to serve the application with php artisan serve when trying to visit the URL's.

What is Routing?
Routing is directing user requests to where they need to go. Laravel takes care of the Pretty URLs for us. Pretty URLs are a way to replace the querystring in the URL with something more eye pleasing. Instead of ?user=2f3rg&redir=1&something=else&here we would see something like /user/2ferg/redir/1/something/else/here.

Web Routes
The first thing we are going to do is edit the web routes file. It is located at routes/web.php

[Image: Screenshot-2022-06-02-3-07-21-PM.png]

The first route is the default route that is loaded by default. The next route was created by me. You can see the route the original code points to is called welcome. In the MVC architecture I know that there is probably a view named welcome. You can visit the URL

[To see links please register here]


Views
You can find your views folder in the resources folder. We can edit the welcome view by accessing it at resources/views/welcome.blade.php.

[Image: Screenshot-2022-06-02-3-13-27-PM.png]

I edited the links at the bottom of the page. I removed the links and made my own link that points to a view named user. Now we can copy the welcome.blade.php file into user.blade.php.

[Image: Screenshot-2022-06-02-3-17-03-PM.png]


Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.


And edit the user.blade.php file to say something like User dashboard. And if you visit the URL

[To see links please register here]

you will see this:

[Image: Screenshot-2022-06-02-3-17-07-PM.png]
Reply

#2
A very well documented and elaborated guide, that's easy to follow and understand.

Good work
Reply

#3
Good job keep them coming
Reply

#4
nice introduction to start it off
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through