Questions tagged [laravel-8]

Laravel 8 is the 8th version of the open-source PHP web framework created by Taylor Otwell. It was released on September 8, 2020. Please use the [laravel] tag for general Laravel-related questions.

Laravel 8 released on September 8th, 2020, Bug Fixes Until March 8th, 2021 and Security Fixes Until September 8th, 2021.

Laravel Jetstream has been added on Laravel 8. Laravel Jetstream is a beautifully designed application scaffolding for Laravel. Jetstream provides the perfect starting point for your next project and includes login, registration, email verification, two-factor authentication, session management, API support via Laravel Sanctum, and optional team management. Laravel Jetstream replaces and improves upon the legacy authentication UI scaffolding available for previous versions of Laravel.

Jetstream is designed using Tailwind CSS and offers your choice of Livewire or Inertia scaffolding.

Please use this tag when your question specifically affects Laravel 8 (i.e., a feature that was available with Laravel 8 but is no longer available or potentially a bug that only affected Laravel 8)

7392 questions
600
votes
23 answers

How to create custom helper functions in Laravel

I would like to create helper functions to avoid repeating code between views in Laravel. For example: view.blade.php

Foo Formated text: {{ fooFormatText($text) }}

They're basically text formatting functions. How should I define globally…
Calebe Oliveira
  • 6,111
  • 3
  • 14
  • 7
320
votes
32 answers
62
votes
7 answers

'mix' is not recognized as an internal or external command in Laravel 8 new installation

I have installed a new Laravel 8 application, and then I ran... npm install Afterward, I ran... npm run dev I get the following error. 'mix' is not recognized as an internal or external command > @ dev…
Spiral
  • 917
  • 1
  • 9
  • 15
49
votes
7 answers

Error: While updating laravel 8 to 9. Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

Nothing to install, update or remove Generating optimized autoload files Class App\Helpers\Helper located in C:/wamp64/www/vuexylaravel/app\Helpers\helpers.php does not comply with psr-4 autoloading standard. Skipping. >…
Sajeed Kannoje
  • 931
  • 1
  • 5
  • 13
48
votes
7 answers

“vagrant” will damage your computer. | macOS v12 (Monterey) #13132

Today morning suddenly I started getting this popup whenever I ran Vagrant up in my Mac. VirtualBox version 7.0.4 r154605 (Qt5.15.2). macOS v12 (Monterey), MacBook Pro (Retina, 15-inch, Mid 2015) Ubuntu LTS Settler Version Homestead…
Jigar
  • 3,055
  • 1
  • 32
  • 51
47
votes
4 answers

How to fix laravel 8 UI paginate problem?

I had a problem while trying out the recently released laravel 8, I'm trying to find out what the changes are and how it works. When I did that I had a problem with the paginate laravel 8 UI getting messy and somehow it happened. Is there anyone who…
Habi nata
  • 620
  • 1
  • 4
  • 10
38
votes
9 answers

How to Install Vue.js in Laravel 8

I am using laravel 8 and now I want install Vue.js. I am trying like this composer require laravel/ui php artisan ui vue php artisan ui vue --auth
Ehab Talaat
  • 381
  • 1
  • 3
  • 5
36
votes
7 answers

SerializableClosure error in Laravel - Your serialized closure might have been modified and it's unsafe to be unserialized

I am getting this error in my domain where I have used laravel v8 for my site. It shows error in line no 52 in index file: Previously my .env file was not reading. As soon as I fixed that error I got this one now. Please help me solve this error.
Cherryl Rarewings
  • 618
  • 1
  • 5
  • 13
36
votes
9 answers

Laravel, Call to undefined function Database\Seeders\factory()

I get the title error when I run command: php artisan db:seed My screenshot: I have no idea where this problem comes from. I was searching for code examples and solution but I haven't found anything :( ArticlesTableSeeder.php
Jakub Padło
  • 703
  • 3
  • 8
  • 16
30
votes
10 answers

Laravel, NPM: Command "mix" not found

Does anyone have an idea why it throws the following error and how to fix it? I have also tried to reinstall all packages using npm install several times. Reinstalling NodeJS on Windows didn't work; I'm using Laravel 8.22.0. Full Log 0 verbose cli…
Pinnokkio
  • 439
  • 1
  • 5
  • 10
22
votes
6 answers

Can't connect to database Laravel Sail

I'm trying to create a simple laravel project and I'm following a laracast to set up the project with Sail. The project is running fine and I was able to migrate with vendor/bin/sail artisan migrate. The next step in the laracast is to connect to…
FonsVC
  • 411
  • 1
  • 6
  • 13
20
votes
6 answers

How to properly start Laravel 8 with Bootstrap & authentication

I face the following image every time I want to start a new Laravel 8 project with authentication routes set up using the laravel/ui package and Bootstrap scaffolding. Meaning that the Bootstrap is not yet loading up! Therefore, I have to re-run…
user9277271
20
votes
1 answer

Target class does not exist. problem in laravel 8

When create a new project with laravel 8 and I get this error. Illuminate\Contracts\Container\BindingResolutionException Target class [SayhelloController] does not exist. http://127.0.0.1:8000/users/john
user14258897
18
votes
6 answers

Unable to set the APP_PORT on .env for Laravel Sail

I have the following problem in Windows 10 (in Ubuntu works properly): I'm working in Laravel 8 with Sail When I create the APP_PORT variable on…
Fredy Rosero
  • 371
  • 1
  • 3
  • 8
17
votes
9 answers

Disable Auth Register route in Laravel 8?

I need to disable my register route in Laravel 8. Tried Auth::routes([ 'register' => false, 'login' => false, ]); but the application threw up an error. RuntimeException In order to use the Auth::routes() method, please install the…
Debajeet Choudhury
  • 389
  • 2
  • 5
  • 9
1
2 3
99 100