Here you will find all the blog posts of Laravelia. Just scroll down and read all the content of Laravelia.
Laravel provides us with a convenient way of routing. We can easily accept a URI with closure in Laravel routing. The router allows you to register routes that respond to any HTTP request. The available routes in Laravel 9 are given below:
In this example, we will see how to redirect users using laravel Route::redirect() method in Laravel 9 application. Assume If you are defining a route that is going to redirect to another URI, you may use the Route::redirect method.
In this example, we will see how to load a view using the Laravel Route::view() method in the Laravel 9 application. Assume If you are defining a route that is going to load a blade view, you may use the Route::view method.
In this example, I will show you how to pass parameters and multiple parameters in the Laravel route. If you don't know how to pass multiple parameters and single parameters then this example is for you.
In this Laravel 9 route optional parameter tutorial, I will show you how to pass optional parameters in Laravel, and also we will see how to pass the default values with this optional route parameter.
In this example, I will show you how to use regular expressions in the Laravel route. Sometimes we need to specify the type of route parameter. In this case, we can use regular expressions.
In this tutorial, I will show you laravel route global constraints example. You know that we can validate our route parameters using regular expressions. Did you know that we can do it using global constraints? If you don't know that, this example is for you.
In this example, I will show you how to check the current route used along with the request. Sometimes we would like to determine if the current request was routed to a given named route, then we can use the named method on a Route instance
In this example, I will show you how to get laravel 9 get current route name in the blade file. You know that we need the current route name when we need to show a specific link active in Laravel.
Laravel 9 released controller grouping in route. Now we can create a route controller group in our route. In Laravel 8, there is no option like that. But in Laravel 9, we can make a controller grouping route in Laravel 9.