filmov
tv
Laravel Basics - Constrain Route Parameters

Показать описание
#laravel #php #webdevelopment
Sometimes, in Laravel development, you may want to constrain the format of the route parameters. You can use the where method on a route instance, which accepts the name of the parameter and a regular expression defining how the parameter should be constrained.
Follow this video and see what you can do. Besides the where method, Laravel also offers you the handy methods to save you from the tedious regular expressions:
1. whereAlpha
2. whereNumber
3. whereAlphaNumeric
4. whereIn
For the video on how to use service provider and dependency injection, please watch:
For the video on how to define singleton dependency in service provider, please watch:
For the video on how to use contextual binding, please watch:
For the video on binding typed variadics, please watch:
For all the Laravel videos, please follow the playlist:
Sometimes, in Laravel development, you may want to constrain the format of the route parameters. You can use the where method on a route instance, which accepts the name of the parameter and a regular expression defining how the parameter should be constrained.
Follow this video and see what you can do. Besides the where method, Laravel also offers you the handy methods to save you from the tedious regular expressions:
1. whereAlpha
2. whereNumber
3. whereAlphaNumeric
4. whereIn
For the video on how to use service provider and dependency injection, please watch:
For the video on how to define singleton dependency in service provider, please watch:
For the video on how to use contextual binding, please watch:
For the video on binding typed variadics, please watch:
For all the Laravel videos, please follow the playlist: