Category "laravel"

array_key_exists(): The first argument should be either a string or an integer

Im trying to upload an image in my Laravel app. but have an error: array_key_exists(): The first argument should be either a string or an integer Im using the e

Laravel passport get token from database

I am using a Laravel version 5.5 and using Passport for authentication. I have created token using: $token = $user->createToken('string')->accessToken;

Laravel/docker-compose/redis - Class 'Redis' not found

This project was set up by another team and I'm unable to get passed this one error. Using PHP 7.2 and Laravel 6.2. My docker-compose.yml: redis: image: re

Axios response.data return HTML instead of an object

I need help about Axios. I develop a SPA webapp on Laravel 6 (with package SPARK) and VueJS (version 2). On a Vue component, I want to retrieve datas from my b

Laravel Livewire Mixed Content error in production

I deployed a Laravel-Livewire on Digital Ocean and now I'm having a Mixed content problem when I try to upload a file. Here is the error: UploadManager.js:131

Laravel-fopen: failed to open stream: Permission denied

I'm trying to upload an image to laravel's /storage directory. I'm getting an error fopen(C:\Temp\AppName\public): failed to open stream: Permission denied

Get name of Language instead of Locale name (in Laravel)?

How do I fetch name of locale (language) not just a locale string, but rather the name of that language in LARAVEL? {{ app()->getLocale() }}

How to test laravel controller method?

My controller looks like this: public function store(Request $request) { $validateData = $request->validate([ 'name' => 'required|u

Laravel MSSQL Server Connection not working

Laravel version:7.13, SqlServer:2019 SQLSTATE[08001]: [Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: An existing connection was forcibly closed by

How do Laravel and Docker play together?

I want to get into Laravel development. As per Laravel's installation guide, I have installed Docker first, which was a first for me. But for me to finally inst

How to get quarter for future date using Carbon?

Simple question: How to get carbon get quarter for future date? Example: Given datetime: 2023-05-03 14:34:09 I want print which quarter will be using Carbon Not

Illuminate\Database\QueryException: SQLSTATE[HY000]: General error: 1 no such table - In clone project

everybody! I've finished a laravel project backend with postgres and it has a phpunit tests, everything it works. So, I did upload to Github. When I did "git

MongoDB Laravel works local but not on host

Would anyone know how to fix this I can't find any method that works online. My mongodb does work local but not on host. I'm using laravel with the following:

Get sum of arrays inside array

How do I get the sum of this arrays. $arrays = [[0, 176000], [0,500], [0, 3960000]]; The output should be: $arrays = [0, 4136500]; Any help will be much

PHP DRY Principle if.. statement

I am still learning and have been reading on DRY Principles for a while now, was told by my mentor that I need to adhere to the DRY principle for this code belo

PHP DRY Principle if.. statement

I am still learning and have been reading on DRY Principles for a while now, was told by my mentor that I need to adhere to the DRY principle for this code belo

How to stop the GET method is not supported for this route from showing?

I have a working Laravel project with loads of different routes. I'm currently testing it and one of my tests was to check if a user were to use a delete or pos

How to change User::Model In Laravel with User Auth in Firebase

Recently I have make Laravel auth with composer require laravel/uiand I can edit/create user with MySQL where as auth users for Firebase . I also can create/

How to change User::Model In Laravel with User Auth in Firebase

Recently I have make Laravel auth with composer require laravel/uiand I can edit/create user with MySQL where as auth users for Firebase . I also can create/

Some Bootstrap 5 colors are not working compled with Laravel Mix

I am integrating Bootstrap 5 into my Laravel project. I installed Bootstrap with NPM and complied with Laravel Mix, and it's working. However, some extra colors