Questions tagged [laravel-routing]

Incorporating Routing in Laravel's MVC Structure. Laravel stands as a freely available, open-source PHP web framework distributed under the MIT license agreement.

Exclusion of Controller Methods with Laravel 4 Routing Filters

Is there a more efficient way in Laravel 4 to exclude certain methods from the 'auth.sentry' filter in a controller? Route::get('student/login','StudentController@getLogin'); Route::post('student/login','StudentController@postLogin'); Route::get('stude ...

Achieving a URL structure similar to a blog post (such as www.abc.com/how-to-learn-php) in Laravel 5.5 - Step by

I am looking to create a personalized profile URL for users resembling a blog post format (www.abc.com/profile/tom-cruise-brad-pit). Every user in the database has their own unique identification, but I prefer not to display this ID in the URL. ...

Using Laravel to dynamically load a post with a specific custom identifier through an asynchronous HTTP request

When I click on a post link, I want to load my post via AJAX. How can I send the post ID through AJAX? In my Blade file, there is a link: {{ link_to_route($post->type, $post->comments->count() . ' ' . t('comments'), array('id' => $post-& ...

Error in Laravel: Required Route Parameters Missing

I am encountering an error that reads: Illuminate Routing Exceptions UrlGenerationException PHP 8.1.1 9.1.0 Missing required parameter for [Route: client.brand_clicked] [URI: brands/{brand_id}] [Missing parameter: brand_id]. Whenever I try to access my ...

Displaying a restricted number of records in the Laravel resource index listing

There are two main resources that I am working with: Organizations OrganizationUsers (which has a foreign key to Users on user_id) The User model includes the following attributes and methods: class User extends Authenticatable { use Notifiable; ...

Moving the query function from routes to the repository in Laravel

Greetings! I am relatively new to the world of Laravel and I am in the process of setting up a repository to consolidate repeated database calls. It seemed logical to centralize these calls for easier reference. Currently, I have a chained select feature t ...

Unable to get Laravel route to work with parameters

In my route, there is an optional parameter. When I click on the link, it creates a problem. The URL looks like: http://localhost/my/public/admin/category/sub-create?2 However, it should look like this: http://localhost/my/public/admin/category/sub-crea ...