laravel-6 Questions

3

Solved

I have the following code in my controller where I am trying to load all 'members'. Every member can have more than one phone number. Phone numbers are stored in a table called phone_numbers and ar...
Lita asked 4/4, 2020 at 13:6

17

Solved

I moved the Laravel project from localhost to the server for which I have done every step. I am able to view the login page on my server. The problem is I am not able to connect with my MySQL serve...
Schaefer asked 4/10, 2019 at 9:46

8

I am trying to make auth through laravel package using admins table. In the project directory I added admin guard into config/auth.php 'providers' => [ 'users' => [ 'driver' => 'eloquen...
Dix asked 7/2, 2020 at 7:46

35

Solved

In Laravel v4 I was able to get the current route name using... Route::currentRouteName() How can I do it in Laravel v5 and Laravel v6?
Plummer asked 5/5, 2015 at 7:27

3

Here is what i tried Middleware return $next($request) ->header('Access-Control-Allow-Origin', '*') ->header('Access-Control-Allow-Credentials', 'true') ->header('Access-Control-Allo...
Vacillate asked 5/12, 2019 at 11:49

5

Unfortunately config(['key' => 'newValue']) doesn't work in a Dusk setup (for overriding a config value), presumably because it would change the config of the system running the test rather than...
Mane asked 18/10, 2019 at 12:20

4

Solved

I need to load a different .env file, named .env.test under certain conditions. I attempted to do that through a middleware by adding app()->loadEnvironmentFrom('.env.test'); Dotenv::create(base...
Ides asked 2/10, 2020 at 16:15

12

This is driving me crazy second day. I'm new to Laravel and trying to get Laravel 6 work on Google App Engine Standard. Tried: This tutorial and other ones, but it still fails to load Laravel index...
Hayott asked 24/9, 2019 at 19:39

2

I am querying a large data sets from the table and then iterating through a loop for creating a json file. $user = App\User::all(); foreach($user as $val){ // logic goes here for creating the js...
Fibrillation asked 20/11, 2019 at 7:21

10

Solved

I start a new project in laravel but my composer installed a fresh version of laravel 6.0.1. Php artisan make:auth command can't work. I try many times but error can't remove composer require ...
Viehmann asked 9/9, 2019 at 16:1

6

Solved

IMHO, the current Database channel for saving notifications in Laravel is really bad design: You can't use foreign key cascades on items for cleaning up notifications of a deleted item for examp...
Reedy asked 26/4, 2017 at 23:17

2

Solved

Can someone explain the difference between a ResourceCollection and JsonResource? In Laravel 6 docs you can generate 2 different types of resources... ResourceCollection and JsonResource. https://...
Lillith asked 10/10, 2019 at 4:14

4

When I use the following PostResource, and Post Test, my tests succeed: PostResource.php public function toArray($request) { return [ 'id' => $this->id, 'title' => $this->title, '...
Disseminate asked 20/12, 2019 at 22:6

5

I get this error in the browser on my test Laravel project: Illuminate\Database\QueryException SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost' (SQL: select count(*) as aggregate fr...
Dentoid asked 13/11, 2019 at 9:21

6

Solved

I recently ran into a problem where I need to change one of Laravel's vendor files to get a desired result. That file is vendor/laravel/framework/Illuminate/Routing/CompileRouteCollection.php. Ins...
Twinge asked 25/3, 2020 at 1:47

2

Solved

I am writing some unit tests to test a database transaction middleware, on an exception everything within the transaction should do a rollback. And This piece of code works perfectly fine and passe...
Hedve asked 22/1, 2020 at 14:3

6

Solved

I've upgraded my laravel 5.8 project to 6.0. It has upgraded successfully but when I'm trying to run the project or installing another package to my project it is giving me error named as "Call to ...
Laddie asked 10/9, 2019 at 5:49

22

Solved

I am beginner to laravel. I have created project. And I have run following commands to it. composer require laravel/ui --dev npm install npm run dev php artisan ui vue php artisan ui vue --auth ...
Mydriatic asked 26/9, 2019 at 7:41

4

Solved

I am using Laravel 6 and Bootstrap 4. I made a little app and I was trying to change the background color of the body in the CSS file but I noticed that it didn' work. So I checked in the tools f...
Rosenthal asked 11/11, 2019 at 23:6

3

Solved

In previous versions you could use the artisan command php artisan app:name NewName to use change the applications namespace (defaults to App). The artisan command seems to be missing now. Is ch...
Contort asked 25/9, 2019 at 12:58

7

Solved

I'm trying to install maatwebsite/excel; however, I can't get it to work. I tried deleting the composer.lock file and running: composer install composer update I also tried: composer require ...
Chatelaine asked 1/10, 2019 at 6:33

3

Solved

When trying to retrieve the APP_URL from the Laravel config it returns the wrong URL for development only. My env file has the following: APP_URL=http://127.0.0.1:9000 However when I call env(...
Ballarat asked 5/11, 2019 at 17:2

2

The cache prefix setting has the default value: 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache') But when I cache some data (using Redis), the cache key ha...
Dilks asked 15/1, 2020 at 12:29

5

Solved

I am writing tests in a fresh installation of Laravel 6.15 (with Spark 9). My PHP version is PHP 7.4.2. My testing environment is Laravel Valet on MacOS. I am facing an issue where whenever I use...
Bridging asked 19/2, 2020 at 9:50

8

I am new to laravel. I am working on laravel version 6. I have created migration. It works nicely the first time, but if i change something in the migration file and then i run php artisan migrate ...
Arther asked 2/10, 2019 at 14:0

© 2022 - 2024 — McMap. All rights reserved.