skip to Main Content

Put Route returns CSRF token mismatch Laravel

I am trying to configure a crud api for a blog and right now i made the PostController like this: <?php namespace AppHttpControllers; use AppModelsPost; use AppHttpRequestsStorePostRequest; use IlluminateHttpRequest; class PostController extends Controller { /** * Display a listing of…

VIEW QUESTION

Issues with Laravel groupBy

I am using Laravel 10. This is crm_details table: I need to count each status,. Also I need to consider parent_token with the same value as a single row. That means 2 rows have same `parent_token' then It will consider…

VIEW QUESTION

Undefined variable $totalPrice getting this error i want print $totalPrice in html code form jQuery. not working code after success status

Undefined variable $totalPrice getting this error i want print $totalPrice in html code form jQuery. not working code after success status function applyCouponCode() { jQuery('#coupon_code_msg').html(''); var coupon_code = jQuery('#coupon_code').val(); if (coupon_code != '') { jQuery.ajax({ // url: '{{ route('apply_coupon_code') }}',…

VIEW QUESTION

Laravel – hasManyThrough with a belongsToMany?

A Producer hasOne Distillery, a Distillery belongsToMany Whiskies. A Whisky belongsToMany Distillery, a Distillery belongsTo Producer. I wish to use hasManyThrough so, to get a Producer's Whiskies that belongToMany Distillery. But how can I use hasManyThrough with belongsToMany relationship? I…

VIEW QUESTION

Logout in Laravel 10 Sanctum

I tried the logout operation by deleting all the authenticated tokens as shown in the function below: public function logout() { auth()->user()->tokens()->delete(); return response()->json([ 'message' => 'Logout Successful' ], 200); } The code works fine when i checked the route…

VIEW QUESTION
Back To Top
Search