Category "laravel"

Copy to clipboard code in JavaScript doesn't work

I'm trying to write in javascript and I want to understand why it doesn't work? sample order code that I want to copy: 593004485164756431 when I copy to clipboa

PHP using str_starts_with for array to exclude same as with wildcard

This is my ignore list which i have some item that i don't into that $ignoreRoutes = [ 'administrator', 'attachImage', 'login', 'logout', 'l

Laravel: Schedule a job or an artisan command?

I have a Product model with id,name,price. The price value is stored in an external API and i need to fetch it every minute in order to update it in the databas

Laravel component constructor method is only working in local environment

My component looks like this: namespace App\View\Components; use Illuminate\View\Component; use App\Http\Controllers; use Illuminate\Http\Request; class shop

Laravel 5.5 file_put_contents permissions issue

I have a new Laravel project, with Passport and basic authentication installed, and I am getting this error when I try to call the built in /api/register endpo

[laravel][npm] I can't use swiper error Uncaught TypeError: Swiper is not a constructor

Today I try swiper but not working. I install Swiper with npm npm install swiper this is my code index.blade.php <div class="swiper-container">

Laravel unique validation on multiple columns

I have 2 columns in table servers. I have columns ip and hostname. I have validation: 'data.ip' => ['required', 'unique:servers,ip,'.$this->id] This

How to have laravel pagination links using the bootstrap 4 default pagination styles?

I'm using laravel default pagination with: {{$posts->links()}} and the pagination works, the links appear and

What's the difference between `retry_after` and `timeout` options for Laravel queues?

I came across an issue in my code base where a job was being terminated early while its timeout was set to 540 seconds. However after looking in the documentati

Detect Laravel fortify login and do something

I'm using Fortify in my Laravel 8 application that's used as an API backend to a Nuxt front-end. When a user logs in, and their log in is successful; I'd like t

Using spatie(laravel-permission) in Laravel 8

When Assigning permission for a role using seeder, in permissions table it will take guard_name as "web", but when adding permission through CRUD, it will take

Laravel mongodb where array field contains value

I use mongodb and mysql together with Laravel. Fields table in mysql database can have more options in mysql database. fields table in mysql: id, name options

Check if user online laravel

I have column last_activity, where write date last activity user with middleware. How I can check online user and when he logout? Middleware: class LastActivi

How to order by eager loaded relationship in Laravel 5.5?

The code below works perfectly and displays all products with discounts in JSON Format for my API. But I want the result ordered by id in the discounts table. S

Change Laravel Fortify Auth Column Names

I tried following these steps to no avail https://stackoverflow.com/a/64299968/7309037 I have a User Table with the column name "EmailAddress" but Laravel is lo

Laravel Inertia Shared Data not updating

I have a laravel breeze app up and running using InertiaJS scaffolding. I'm using a middleware to pass general data to the layout. The issue is the following :

Target [Laravel\Fortify\Contracts\ResetsUserPasswords] is not instantiable

I am implementing the forgot password / password reset logic with Laravel 8 and Fortify for an SPA application. When the /reset-password is called and if the da

How to run laravel artisan command on server?

How to run laravel artisan command on server? I have to run this this command: composer require realrashid/sweet-alert

Fresh Laravel install deletes server.php on artisan serve

I'm a bit fresh to Laravel. I installed it via composer in the xampp/htdocs file. I installed the latest version 5.6. The install works with no errors, and the

WebSocketChannelException: HandshakeException - Flutter app with Laravel Websockets on custom server Cerificated with Cpanel

I have Laravel web application includes live chat relying on Laravel Websockets https://docs.beyondco.de/laravel-websockets/ For now i am making Flutter app fo