Category "laravel"

Illuminate\Contracts\Container\BindingResolutionException - Target class [CommandMakeCommand] does not exist

Using Laravel 8.75 and trying to upgrade to php 8.1 in composer.json to "php": "^8.1" and receive the error of Illuminate\Contracts\Container\BindingResolutionE

Laravel Vue.js API: axios, FormData() is empty

I'm trying to update some data in Model using API in Laravel and Vue.js but I can't do this because FormData() is empty, I'm checking the data from formdata us

Laravel: Feature test json validations unique rule issue

I recently started implementing the unit testing in Laravel 9.x framework. So far, I was able to write some basic rules without any complications. However, in m

How to check authorization before loading Route Model Binding

I ask this question after doing various searches without finding any clarifying information that helps me solve the problem that I am presenting. I have created

Laravel 9 - Passport custom api for Authorization

In my application, I am using Passport for Authentication. I have created a Password grant client for generating access tokens for our mobile and web app. Now I

How to Pass Multiple variables from partial view to multiple views laravel blade

I'm trying to access variables in different views. But I get the error variable undefined. I have tried as below @include('admin.layouts.vendorpartial',

Laravel Nova Card Options Missing Function

I was recently given a Laravel app that uses Nova and Vue in it - all three of which I've never worked with before, so apologies in advance if I ask something t

How to create a patient table from an existing role table in laravel

So i am lost and i hope someone can help me. I have a User model that has a name and email fields. A Role User model that has a many to many relationship where

Laravel application on Heroku, 419 page expired when try to login/register

I set up my Laravel 8+ application on Heroku.com. Almost everything works perfectly, but when I try to register/login I got the "419 | Page Expired" error. I am

I get this error: Attempt to read property "Username" on null, when trying to display the username [duplicate]

I am trying to display the Username on the web page, but I keep on getting the error Here is my blade template @extends('layouts.app') @secti

Laravel Store , corrupted or not all are saved on database

public function patient_aprrovedischarge(Request $request, $id) { //get patient details $patientDischarge = DischargedPatients::where('id'

Laravel Store , corrupted or not all are saved on database

public function patient_aprrovedischarge(Request $request, $id) { //get patient details $patientDischarge = DischargedPatients::where('id'

Laravel says application is in production but APP_ENV is local

My Laravel .env: APP_ENV=local APP_KEY=base64:7HjBWArUX989c8K87678687m2+6786876hs= APP_DEBUG=true APP_URL=http://localhost ... I get the following message if I

Spatie's Laravel Permission and policies don't work together

Excuse my English, it's from a translator. I am using Spatie to control the permissions of my application, for example, each module I have to see, create, updat

Eloquent Where using CASE WHEN and withMin()

I have a query like this: Product::withMin('promotions as promotion_price', 'promotion_products.price') ->orderByRaw('CASE WHEN promotion_price IS NULL THE

How to use Oauth2 Provider instead of Oauth1 in Laravel Socialite?

I'm currently developing social listening API with twitter, the flow is logged in user (using basic API Token to send request to the API) are redirected to twit

How can I display an html text as a function in the blade?

I want to display the text in the blade as html. To do this, I used this code in the controller section: ‌ class MessageController{ public function cus

Sending custom verification emails from a controller method

I have some data i am receiving from new users and extracting the email to send to the new user. This is how i am doing it public function register_mechanic_pos

What causes the "route not defined" error in this Laravel 8 API?

I am working on a registration form with Laravel 8 and Angular 13. The back-end is an API (link to Github repo). In the UserController I have a signin() and a s

Laravel Json Reponse running really slow

My code suddenly started working really slow. I don;t see any reason, noting was changed or updated. return response()->json([ 'status' => 'su