Category "laravel"

What causes the data validation error in this Laravel API? [duplicate]

I am working on a registration form with Laravel 8 and Vue 3. The back-end is an API. In the users table migration file I have: class CreateUs

Laravel validation to make sure 2 values are not present at same time

I need to validate a request where if field1 is present, then field2 should be empty and vice versa. How can i achieve this in Laravel?

How can I access parent scope in laravel lighthouse relationship?

Laravel lighthouse doesn't access relationship scope like eloquent. class Tenant extends Model { public function products(): HasMany

How to include model attribute automatically?

I have the User model which define the following attribute: public function getAvatarUrlAttribute() { return 'https://i.pravatar.cc/300?u=' . $this->

I can not found blade from resources. But website working

@section('contents') <app-employee-list></app-employee-list> @endsection How I can get the full html structure form this? I can not found full code.

Laravel - Get current .env() Value

I am working on a Laravel project. I often change the database connection between Mysql and Sqlite during development. In a php artisan Laravel command I have a

How to show monthly wise data in Laravel 8

I've posted about this three times and hopefully someone will help me with a solution. I have a lot of data in my database that the user has created. Suppose I

Cannot install laravel oci8

the composer require yajra/laravel-oci8:^8 command is giving me the following error: C:\Users\yö\PhpstormProjects\BRP>composer require yajra/laravel-oci

stop "npm install" at [..................] | idealTree:regal: sill idealTree buildDeps

when I try to run npm install it stop at this error [..................] | idealTree:regal: sill idealTree buildDeps I have tried for fix it for a long time

I cant migrate database - Homestead

When i type php artisan migrate from my pc it throws an error. 1 D:\xampp\htdocs\cms\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php

how to hide results from database until the seacrh is complete in Laravel?

i am making a search for the website so the user can search for results from database everything is working fine but how can i hide results until the user compl

Laravel efficient way to remove X records if there are duplicates

I'm trying to write a query to be able to find duplicate records based on a column called hash and remove all but the 5 newest records, I figured I could use th

I have project created by laravel 8 ,and i use JWT for my API ,now i can't install pusher because of JWT version

Someone can help me to fix this conflict Your requirements could not be resolved to an installable set of packages. Problem 1 - tymon/jwt-auth is locked to vers

session and csrf dose not work in laravel after enable cloudflare

session and csrf did not work in laravel after enabling Cloudflare and it redirects to the login page after submitting the login form and also before redirectin

Laravel Fortify Logout Redirect

Hello guys is there any ways to redirect the logout function of Fortify? <div class="nav-link" id="nav-bar-logoutbutton"> &

Trying to restrict access to a route if loggedIn condition is true

I am trying to restrict access to the login if the user is already logged in by checking if there is already a token in the localStorage. Any idea on how I can

Error while 'composer require jenssegers/mongodb' adding MongoDB to new Laravel 7 Project

After fresh installation of laravel 7 project, C:\xampp\htdocs\blog>composer require jenssegers/mongodb --ignore-platform-reqs But this is giving an error

Why is my Laravel Inertia Lambda rendering pages inside nested modals?

I have a Laravel app that works fine locally using Docker/Sail. However when I deploy that app to an AWS Lambda, it doesn't function in the same way. Once runni

Laravel livewire sorting by foreign key

I'm trying to sort a post table by a foreign key, and can't figure out how to do it. Hopefully someone can lend me a hand. I can sort by the fields already pres

laravel 8 instalation error - npm run dev throws error

I am trying to install a fresh laravel 8 project. After downloading frontend scaffolding when I try to run npm run dev it gives me an error. This problem also h