Category "laravel"

How can I send JSON data from local storage to controller in Laravel?

I want to send the json data from view to controller using ajax. How can I achieve that? The data in local storage is [{"productId":2,"productCost":"630","produ

HTML returning as text Laravel Controller

I am trying to return HTML from Laravel controller, but it is returning as plan text: Example: <input type="checkbox" class="row-select" value="9"> ->a

What is the best practice to query this type of data in laravel?

I have 3 tables structure like below:- products id name 1 apple 2 orange branches id name 1 Branch 1 2 Branch 2 stocks id branch_id product_id qty 1

Laravel - Sanctum Remove Database Id From Generated Token

Currently I am building rest API using Laravel. For authentication, I am using the Sanctum package. Every time a user is logged in it generate a token that look

CKEditor5 Vue(tify)2 Laravel - Cannot read property 'getAttribute' of null

I followed this https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/frameworks/vuejs-v2.html#integrating-a-custom-build-from-the-online-bui

Images don't save using Faker Image in seeder

I'm doing a project on Laravel 7 with FakerPHP, I want to populate my database with some random images and at the same time saving them on my local storage fold

There is no like "toOthers()" method in @broadcast of lighthouse?

framework versions laravel 6.20 lighthouse 5.3 Problem I'd like to use toOthers() method like this (laravel doc) in lighthouse but it seems @broadcast doesn't h

How to reliably detect an expired Laravel session?

I am working on a web client which does a lot of AJAX request. The backend is written in Laravel. If the backend throws a PHP exception, the backend sends a JSO

Display hidden not working with flex in Tailwind

I'm trying to hide a div in mobile, and display flex with md screen & above, here's my code: <div class="hidden md:flex"> <x-navbar.nav

How to install GD Library? Laravel at AWS Lambda with Bref

When using Intervention\Image in laravel on lambda The following error has occurred. By the way, it works in the local environment. I have to add gd. [2021-08-

How to pass a value from Laravel blade to a vue component?

I am working on laravel / vue project and i want to pass a value from laravel blade to the vue component but i get this error : Missing required prop: "id" at

Use identifier in PHP and how does it affect the logic

Use identifier is used when we want to send some outer environment variables inside closures so I have a scenario. $invoiceList = UserInvoice::where('user_id',

Is a way to echo translation string in laravel?

I want to translate text inside the button. <?php if ($product->category_slug === 'bramy-przesuwne' || $produc

Ordering Relationship field in CreateOperation - Backpack for Laravel

I wanted to order by name the Categories (relationship field) of my CreateOperation. It is ordered by default by id. protected function setupCreateOperation()

How to import individual icons with FontAwesome v6

In my web app built on Laravel, which under the hood uses an npm/Webpack build process, I'm currently using the SCSS icon sheet versions of FontAwesome like thi

Laravel query builder inject column value into Carbon query

I've got a query that I'm running in my project on a model called Domain, it returns all domains where the status column of a domain matches complete and a date

Laravel Scout (Meilisearch) - Says imported data, but doesn't

I've installed and configured meilisearch + Laravel Scout package. My Model: class Post extends Model { use Searchable; } When I run php artisan scout:impo

Laravel validate() method returns index html page when false

I'm building my first laravel API and when I try to validate some mock form data using Postman with POST method, the application returns to me the HTML of the i

Laravel Jetstream - How to join a default team at registration

I am trying to change Laravel Jetstream's logic in order to join a default team at registration rather than create a personal team. I found the method that does

Laravel nova / add second login

Im creating a Website with Laravel nova. When installing nova by default you get a login, a users table and a dashboard. Now I need to add a second login for an