skip to Main Content

Laravel: 'Get' Route not calling method in controller

I have a route as: Route::get('/edit/detail/{modelName}/{rowId}/{persId}',[AddPersInfoController::class,'editPersDetailTabs'])->name('edit_pers_detail'); and I'm calling it from a button in a table as: Edit: This is the actual code on my page. <td><a href="{{ route('edit_pers_detail',['Posting_history', $posting->id, $posting->pers_info_id] ) }}"> <button class="btn btn-icon btn-primary"> <i class="demo-pli-pencil fs-5"></i>…

VIEW QUESTION

Laravel Namespace Resource Controller Routing

I was working on a laravel project. The following is the code of my UserController: <?php namespace AppHttpControllersBackendAdminUsers; use AppModelsUser; use IlluminateHttpRequest; use SpatiePermissionModelsRole; use AppHttpControllersController; use IlluminateSupportFacadesSession; use AppRepositoriesInterfacesUserRepositoryInterface; class UserController extends Controller { protected $userRepository; public function __construct(UserRepositoryInterface…

VIEW QUESTION

Cant return $couponDetails->couponName; value in laravel

$couponCode = $request->couponCode; // Get coupon details by coupon code $coupon = Coupon::where('couponCode', $couponCode) ->get() ->first(); $couponDetails = response()->json($coupon); return $couponDetails->couponName; That returns as: Undefined property: IlluminateHttpJsonResponse::$couponName (500 Internal Server Error) I am tring to get couponName value from couponDetails

VIEW QUESTION
Back To Top
Search