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
17
votes
4 answers

Unable to use Laravel Factory in Tinker

I am unable Model Factory in Laravel Tinker. //ItemFactory.php class ItemFactory extends Factory { /** * The name of the factory's corresponding model. * * @var string */ protected $model = Item::class; /** *…
Lizesh Shakya
  • 2,482
  • 2
  • 18
  • 42
16
votes
6 answers

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 Laravel 8, laravel/ui is deprecated. Is there a new/better way of installing bootstrap?
MrSandyWilly
  • 388
  • 1
  • 3
  • 14
15
votes
5 answers

How to override the validation rule login Laravel\Fortify?

This described in the class Laravel\Fortify\Http\Requests\LoginRequest I want to add one more validation line namespace Laravel\Fortify\Http\Requests; use Illuminate\Foundation\Http\FormRequest; use Laravel\Fortify\Fortify; class LoginRequest…
Alex Itet
  • 191
  • 1
  • 6
14
votes
4 answers

how do you enable ssl using laravel 8 sail

I just created a new Laravel 8 project, following the instructions in their docs. Using Laravel Sail I have the site running locally on my machine just fine using sail up. I have set up an entry in /etc/hosts so the url I go to is…
smenzer
  • 307
  • 1
  • 2
  • 9
13
votes
5 answers

Best way to store and load JSON from database in Laravel

I'm trying to store json into a db and load it back I tried to store {name: "John", age: 31, city: "New York"} It stored correctly. I checked the db, it showed correctly. {name: "John", age: 31, city: "New York"} I kept getting on the…
code-8
  • 54,650
  • 106
  • 352
  • 604
13
votes
4 answers

can't use migrate with sail laravel

Hi I've just tried and to install Laravel 8 with sail and I've run into a problem What I've done is to first run the curl one-liner from laravel's own page curl -s https://laravel.build/sail-test | bash once that finished I did as it said and…
Touchpad
  • 662
  • 2
  • 12
  • 29
13
votes
2 answers

Laravel 8 factory state afterCreating

Laravel 7 factories had method afterCreatingState() where you could define what should happen after Model with specific state was saved into database. $factory->afterCreatingState(App\User::class, 'active', function ($user, $faker) { //…
Nebster
  • 884
  • 1
  • 11
  • 19
13
votes
4 answers

Failed to install laravel/jetstream on laravel 8

after the installation of jetstream via composer composer require laravel/jetstream then suddenly get an ErrorException that there's no such file or directory. Writing lock file Generating optimized autoload files >…
VLDCNDN
  • 692
  • 1
  • 7
  • 19
12
votes
3 answers

Laravel 9 app (upgraded from 8) lang directory not working as expected

I have upgraded my Laravel 8 application to version 9, and according to the docs: upgrade guide, the resources/lang directory is now located in the root project directory (lang). I've moved the lang directory to the root directory of my project, but…
Marcelo The Mage Coder
  • 1,944
  • 2
  • 11
  • 29
12
votes
3 answers

Laravel 8 misbehaves on trailing slash

There is a problem occurring while using APIs with trailing slash. Route Route::post('user/register','UserController@register'); It's working fine when I called this route POST from the postman/website, but I called this route from mobile with a…
Muhammad Shareyar
  • 772
  • 2
  • 7
  • 21
11
votes
5 answers

How to fix this error Symfony\Component\Routing\Exception\RouteNotFoundException: Route [login] not defined. in laravel 8?

i have one controller which contains three functions (register,login,forgotPassword).for login and registration it's working fine but when i try to hit an API in postman i am getting an error,previously i use seperate controller for forgotPassword()…
Sravani
  • 367
  • 1
  • 3
  • 17
11
votes
2 answers

Laravel 8 rest api email verification

After a huge search in the internet and in the forum, I just gave up... I am develping a rest api using Laravel 8 and I am trying since week to make the email verification working using the officiel documentation for that, the email is always sent…
Gothiquo
  • 841
  • 1
  • 8
  • 31
11
votes
2 answers

Laravel 8 & Laravel Sail for dev on Windows 10 is slow. How to speed up?

How can I recreate this? Create install from Laravel 8 docs and Laravel Sail docs. I use the sail up command, which works great. The command builds docker containers, connects them, and makes development as easy as we can imagine, especially for…
Bart
  • 1,889
  • 1
  • 21
  • 38
11
votes
3 answers

Laravel 8 Jetstream: adding new field to the registration process

I started building a web application using Laravel 8. I have noticed that quite a lot of things have changed in Laravel 8 including authentication. Now, I am trying to use Jetstream for auth. I have run the following command to integrate it into the…
Wai Yan Hein
  • 13,651
  • 35
  • 180
  • 372
11
votes
6 answers

Laravel Fortify Customize Authentication Redirect

In Laravel fortify on customization authentication process, i can not able to redirect to login page with error message which we were able to do in Auth. Here is the customization documentation link:…
SK Toke
  • 314
  • 1
  • 3
  • 7