lundi 31 août 2020

only one guard is working on route at a time in laravel

i have package inside my package i have web.php file . I want to limit these routes for two types of users. But the problem is only one type of user can access these routes. if i want web guard user i have to remove customer guard and vice versa. what could be the issue?

Route::group(['namespace' => 'Coldxpress\Ticket\Http\Controllers'], function () {
    Route::group(['middleware' => 'web'], function () {
        
        Route::group(['prefix' => 'tickets','middleware'=>['auth','auth:customer']], function () {
            Route::get('/{filter}', 'TicketController@index')->name('tickets.index');
            Route::post('/store', 'TicketController@store')->name('tickets.store');
            Route::post('/update', 'TicketController@updateTicket')->name('tickets.update');
            Route::get('/filtered_tickets/{filter}', 'TicketController@filteredTickets')->name('tickets.filtered');
            Route::get('/get_replies/{ticket_id}', 'TicketController@getReplies')->name('tickets.replies');
            Route::post('/store_reply/{ticket_id}', 'TicketController@storeReply')->name('tickets.store.reply');
            Route::post('/store_replies_image', 'TicketController@uploadReplyImage');
        });
       
    });
   
});


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2YQwcv2
via IFTTT

Aucun commentaire:

Enregistrer un commentaire