#### Category : routes

I have this error. And this simple code I don’t understand what is my mistake Sourc..

this is route Route::post(‘/delete/comment/{comment}’, ‘[email protected]’)->name(‘comment.delete’); this is function public function deleteAttachment(Comment $comment){ dd($comment); } and this is where I’m trying to use it <a target="_blank" class="btn btn-outline-danger function mr-2 " href="{{route(‘backend.ticket.comment.delete’,[‘comment’=>$comment->id])}}"><i class="mdi mdi-delete"></i></a> and this is error: The GET method is not supported for this route. Supported methods: POST. Sourc.. Read more this is route Route::post(‘/delete/comment/{comment}’, ‘[email protected]’)->name(‘comment.delete’); this is function public function deleteAttachment(Comment$comment){ dd($comment); } and this is where I’m trying to use it <a target="_blank" class="btn btn-outline-danger function mr-2 " href="{{route(‘backend.ticket.comment.delete’,[‘comment’=>$comment->id])}}"><i class="mdi mdi-delete"></i></a> and this is error: The GET method is not supported for this route. Supported methods: POST. Sourc..

Error Image here Login Route Route::get(‘/’, [HomeController::class, ‘index’]) ->name(‘index’) ->breadcrumbs(function (Trail $trail) {$trail->push(__(‘Home’), route(‘frontend.index’)); }); Authentication Routes Route::get(‘login’, [LoginController::class, ‘showLoginForm’])->name(‘login’); Route::post(‘login’, [LoginController::class, ‘login’]); Problem: My project is working fine when i run it locally but when i upload it on server it shows Method Not Allowed exception. I don’t know why. When i used ..

Actually i’m trying to incoporate a little group of extra functions inside of a resource type controller i have defined the actions in the controller and also defined the routes i wish to be used there: 1. Route::resource(‘/stores’, StoresController::class); 2. Route::get(‘/stores/attributes/{store}’, [StoresController::class, ‘attributes’])->name(‘attributes.index’); 3. Route::get(‘/stores/attributes/{store}/create/’, [StoresController::class, ‘attributesCreate’])->name(‘attributes.create’); first row is the common resource routes definition, ..

Como resolvo este erro? Comecei a programar muito recentemente, então perdoem erros, por favor. Estou presa nesse problema umas horas, não tenho ideia de como resolver. Estou tentando fazer um simples tutorial com uma lista indexadora lateral e o erro View [painel.templates.template_erros] not found. (View: C:wamp64wwwprojetoresourcesviewserrors4.blade.php) aparece pra mim. Já tentei usar todas as formas ..

I’ve been working on different projects with laravel 8 and the ‘problem’ (if it is really a problem) is that for every change I made on routes/web.php I have to route:cache every freaking time. If I make a change and route:list, the new changes will not be displayed. Is this thing correct or is there ..

I upload a laravel project on server; When I run all the post request , at first return this error: Request URL: http://example.com/user/register/ Request Method: POST Status Code: 301 Moved Permanently And then this occure: Request URL: http://example.com/user/register Request Method: GET Status Code: 500 Internal Server Error (from disk cache) Post method change to get ..

I have a route and I need to know a controller that would be used for it. I know how to find a controller for the current route: IlluminateSupportFacadesRoute::currentRouteAction(); But how can I do the same for other routes? Sourc..

I have a route and I need to know a controller that would be used for it. I know how to find a controller for the current route: IlluminateSupportFacadesRoute::currentRouteAction(); But how can I do the same for other routes? Sourc..

i am run this command for model, migration, resource controller. php artisan make:model QuestionAnswer -mc -r .. My Edit Function public function edit(QuestionAnswer $questionAnswer) { // return$questionAnswer; return view(‘backend.faq.edit’,get_defined_vars()); } Route one {{route(‘admin.faq.edit’,$questionAnswer->id)}} Route two Route::resource(‘question-answer’,’QuestionAnswerController’); in Edit function for Route one :$questionAnswer object return null. but for Route two : $questionAnswer return .. Read more I am running this command for model, migration, resource controller. php artisan make:model QuestionAnswer -mc -r .. My Edit Function public function edit(QuestionAnswer$questionAnswer) { // return $questionAnswer; return view(‘backend.faq.edit’,get_defined_vars()); } Route one in web.php : Route::resource(‘faq’,’QuestionAnswerController’); in view : {{route(‘admin.faq.edit’,$questionAnswer->id)}} Route two in web.php : Route::resource(‘question-answer’,’QuestionAnswerController’); in view {{route(‘admin.question-answer.edit’,$questionAnswer->id)}} in Edit function for Route .. Read more I’m having a problem with a POST, when I try to run the page and data is loaded in the database table I’m trying to read I always get a Route [MAILFP_Tree] not defined error. The code is triggered by a call for the route in the blade file that will visualize the page <form .. Read more After installing laravel 7 version, I immediately installed ui: auth, ran the php artisan ui bootstrap –auth command (for installation with bootstrap markup), initially everything worked, I had no trouble, but now when going to the pages (Login, registration, reset password) I have a 404 error. web.php (route file) <?php use IlluminateSupportFacadesRoute; /* |————————————————————————– | .. Read more I’ve added link to script from another site: <div data-get-fit-index-lk="">&nbsp;</div> <script src="https://reservi.ru/widget-fit1c.v2/js/config.js" data-fit-salon-id="xxxx"> </script> It embeds page with functions of calendar and planning . So i’ve got a problem. First it was error about route, so I’ve added route::any (there was only ‘get’). And after logging into embedded page with this script (it has own .. Read more I am trying to redirect view with new url through controller in Laravel: I don’t want to write any thing in my route as my controller logic is complex return redirect(‘/thankyou’)->with(‘data’, compact($data)); Above is working fine but I need to change the url as well. I have tried this, but none is working. return redirect(‘/thankyou’)->with(‘data’, ..

i am run this command for model, migration, resource controller. php artisan make:model QuestionAnswer -m -r .. Resource Route Route::resource(‘faq’,’QuestionAnswerController’); My Edit Function public function edit(QuestionAnswer $questionAnswer) { // return$questionAnswer; return view(‘backend.faq.edit’,get_defined_vars()); } Edit Route {{route(‘admin.faq.edit’,$questionAnswer->id)}} Edit function return$questionAnswer return null Below Picture When i Change resource route like model name Route::resource(‘question-answer’,’QuestionAnswerController’); edit ..

I am not sure if I have phrased my question correctly in the title. My problem is, if my current URL is: ‘http://127.0.0.1:8000/admin/details/4’ and if I click on Homepage it should redirect to ‘http://127.0.0.1:8000/admin/home’ but in fact, it redirects to something like this: ‘http://127.0.0.1:8000/admin/details/admin/home’ //routes Route::get(‘/home’, [AppHttpControllersHomeController::class, ‘index’])->name(‘home’); Route::get(‘history’, [AppHttpControllersHomeController::class, ‘history’])->name(‘history’)->middleware(‘auth’); Route::get(‘admin/home’, [HomeController::class, ‘adminHome’])->name(‘admin.home’)->middleware(‘is_admin’); Route::get(‘admin/details/{id}’, ..

Hi everyone I need a solution with laravel project when I try open backend admin with /control its giving me an error "Not Found – The requested resource /control was not found on this server." When I change the name "/control" to anything like "/control5" or something its working fine but the problem is I ..

Morning! I’m programming a laravel 7 multitenancy project using hyn package version 5.6 For now i have a principal app (localhost) and a subdomain (tecnotienda.localhost). But when i route them it ussually overlaps, i mean: it just shows the principal or just shows the subdomain. This is my routes/web.php <?php use IlluminateSupportFacadesRoute; use AppHttpControllersReportController; /* ..

I’m working on Laravel 8 and i have a problem sometimes when I refresh page or open it direct by link showing Not found page 404 error , i tried lots of solutions on internet but no solution working with me . Another note : it’s also showing for me when i send request using ..

Related to: Fleet cart using middlewares in routes but i can not find any $routemiddleware in project…not even in kernel.php …where can i find it? I have an installation of Laravel 5.7 using FleetCart module on my website. Fleetcart is already handling some (or all? not sure) endpoints; in addition to that I want to .. Read more this is where I need middlware public function getFileAttribute() { return route(‘backend.file_url’, [ ‘path’ =>$this->attributes[‘attachment’], ]); } this is my route Route::get(‘file-url’, ‘[email protected]’)->name(‘file_url’); I want to use middlaware Like this but not in web.php or api.php I need it in controller Route::get(‘/download/{ticket}’, ‘[email protected]’)->name(‘download’)->middleware([‘can:download,ticket’]); Sourc..