Category "laravel"

How to install bootstrap in laravel 8

All of the info I can find online says that you should install bootstrap by running composer require laravel/ui and then php artisan ui boostrap. However, in La

Laravel relationship belongsToMany with composite primary keys

I have 3 tables and I'm trying to make relations between order_products and order_products_status_names. I have transition/pivot table named order_product_statu

Laravel: Remove an attribute in returned result

I have the following code: $orders = Order::all(); return $orders; This returns something like this: [ { "id": 123, "qr_code": "foo.p

WHERE IN array binding in DB::raw laravel 5.4

I'm trying to bind an array in a raw WHERE IN query in the Laravel DB example: $arr = [1,2,3]; DB::select(DB::raw("select * from test1 WHERE id IN ? "), [$arr

How does this Facade works

I'm working with Laravel 5.8 and it's an Online Store project written by other programmers. Basically I have faced something weird that never seen before. Let's

Error: ENOENT: no such file or directory, open './node_modules/expo/AppEntry.bundle?platform=android&dev=true&hot=false&strict=false&minify=false'

I'm trying to make a JWT auth with laravel on my back and react-native (with expo) on my front. I have already set up my endpoint to get my token and is working

How To Create A New Database For Each Tenant on Laravel Sail, Docker

I'm developing a multi-tenant app first time by using Laravel 8, Tenancy For Laravel on Docker and WSL2. My issue occures when I try to create a tenant. I want

Why are some Tailwind classes not having effect in JetStream?

Some classes like text-green-500, rounded are having effect and the styling is updated. Ohter classes, like bg-black, don't have any effect on the styling. I am

How to update array value in Laravel

My controller code: $userBasicInfoId = $this->userBasicInfo->where('user_id', $userProfile['id'])->value('id'); if($userBasicInfoId) {

file_put_content...fail to open stream:Permission denied in Laravel 5

The error is mention in below:- ErrorException in Filesystem.php line 81: file_put_contents(/var/www/html/Training-management-system/storage/framework/views

Tailwind Flowbite modal issues on Livewire action

I'm having a real hard time using Flowbite's modals with Livewire. I have a Blade view restaurants.index rendering the x-layout Blade component, calls the <l

Laravel Migrate Specific File(s) from Migrations

Hi read all the included documentation here in https://laravel.com/docs/5.4/migrations. Is there a way on how to migrate a certain migration file (1 migration

php artisan queue:flush does not flush the queues

Our log is blowing up due to non-stop retries by the queue workers despite having the retries set to 1 only. This is literally caused by 3 different failed job

Delete wildcard files with Storage facade in Laravel

Is there a way which allows you to delete files with a wildcard through the Storage facade in Laravel? use Illuminate\Support\Facades\Storage; Storage::disk('f

Artisan, creating tables in database

I am trying to create mysql tables in Laravel 5. I created a file in /project/database/migrations called users.php: [...] public function up() { Schema::cr

Laravel jetstream teams, When switching users how to change home page from dashboard to a different page?

I am using Laravel jetstream teams and I would like to changed the default page (dashboard) when switching teams to a different page I have made (myteams), How

How to get result of the formula on import xlsx with maatwebsite using Laravel? I get formula and not value of the formula

Please advise! During import of xlsx file I get formula and not result of the Formula. Changed config file excel.php to set 'calculate'=> true, on imports a

How can I persist Laravel session data using Inertia Vue?

I'm having trouble updating session values using Inertia.js. The behavior I was expecting was that the redirect to 'Home' would happen only once. Once the sessi

Creating Combinations of Elements

I want to create product option system. I have a form look like this: [![Sample image][2]][2](source: resmim.net) Form's inputs are tag inputs. First input is o

use bcrypt() in jquery or javascript

this code is written in validation.js to validate the all laravel change password forms dynamically $.validator.addMethod("matchp", function(value, elem