I have a problem with laravel and I don’t know how to fix it for now. Actually I don’t know how I face this problem, but will try to explain you what I did and what I tried for now to fix the problem. I tried composer update and this problem occured. Now I can not type any command like
Tag: laravel
How to change date format in multidimensional array and iterate all array with key
I have a multidimensional array with key and value and some key is empty also. Then I want to set a value for internal not empty array. I had this array but I want to set return_time 00:00 all over array. I tried foreach loop but foreach is remove empty array but I want empty array also. I want this
Get all profiles in lat/long + range (laravel – laravel-mysql-spatial)
I am trying to build a form in my laravel app to get all users’ profiles that are in or x km around one selected city from my cities table. I’m trying to use the laravel-mysql-spatial that makes use of the ST_DISTANCE_SPHERE mysql function but cant really wrap my brain around the eloquent stuff ne…
accounts.google.com redirected you too many times in Laravel Socialite
I am working on social login in Laravel. When passing parameter for identifying sign in and signup, it occurs error. “accounts.google.com redirected you too many times.” Without a parameter, it works well. These are my router. This is my controller. This is my view. Answer I just found a route iss…
PHP Group array by date
I have the following array that gathers data from purchases, visits and coupons generated in my application: array:10 [ 0 => array:2 [ “dt” => “2020-11-18” “cupoms” => 9 ] 1 => array:2 [ “dt” => “2020-11-19” “cupoms” => …
Test failing with Integrity constraint violation error, but on the first test case it passed. Why?
I have created a test. It keep failing with this error: I have googled it and read similar questions here and there but still can’t find the appropriate answer. I have defined and call the seeders on setUp, respecting the order of the table. The first call of test method are passed, the rest is failing.…
openssl_verify(): supplied key param cannot be coerced into a public key
I have converted a test_priv.ppk file to a test_priv.pem file using below: Start PuTTYgen. For Actions, choose Load, and then navigate to your .ppk file. Choose the .ppk file, and then choose Open. From the menu at the top of the PuTTY Key Generator, choose Conversions, Export OpenSSH Key. Note: If you didn&#…
Laravel select tags in edit page
I cannot get assigned tags in my view as auto selected: Logic Get all tags $tags. Get assigned tags from database $tags2. Auto select assigned tags. Code <select class="chosen-select-tags&…
Laravel Eloquent ORM – Mismatch between generated SQL and querybuilder results when selecting all models where two relationships are both absent
Let’s say I have a model Foobar with relationships named baz and quux. Foobar belongsTo Baz and Baz hasOne Foobar. This means there is a foreign key column in the Foobar table for baz_id. The …
No application encryption key has been specified. Laravel
When I run my unit tests unsing Laravel I have an error that I can’t resolve… No application encryption key has been specified. I’ve tried this twice commands: php artisan key:generate php artisan …