Questions tagged [laravel-9]

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

Laravel 9 requires the latest PHP 8 and PHPUnit 8 for testing. That’s because Laravel 9 uses the newest Symfony v6.0, which also requires PHP 8.

2126 questions
3
votes
0 answers

How relocate public folder in Laravel 8, 9?

How to change Laravel 8 and Laravel 9 public folder to any other name and relocate the public folder to different path? Example: all Laravel files to folder "laravel_project" and public directory set as "public_html". Folders structure for…
Miron
  • 131
  • 4
3
votes
2 answers

Is the ddd() helper not working in Laravel 9?

I upgraded to Laravel 9 the other day, and now the ddd() helper is failing with the error Call to undefined function ddd(). I found this post on the Laracasts forum, but at time of writing there is only a single reply that states that the…
NerdyGinger
  • 406
  • 7
  • 13
3
votes
1 answer

Laravel 9 incorrect rate limit

I just installed Laravel 9 and Laravel Fortify. However, the rate limit for the login function is incorrect. FortifyServiceProvider.php public function boot() { Fortify::createUsersUsing(CreateNewUser::class); …
user3569641
  • 892
  • 1
  • 17
  • 50
2
votes
2 answers

Laravel 9: replace interface implementation in tests?

Here is an example of how I declared my configuration for MyService public function register(): void { $this->app->when(MyService::class) ->needs(IUser::class) ->give(fn (Application $app) =>…
Majesty
  • 2,097
  • 5
  • 24
  • 55
2
votes
0 answers

Unable to serve static assets with an efficient cache policy in Laravel 9

I am trying Serve static assets with an efficient cache policy. I am using Laravel 9 on a apache2 server. Below is the code i have used in the .htaccess file to enable leverage browser caching: ExpiresActive On # Images …
JustAG33K
  • 1,403
  • 3
  • 13
  • 28
2
votes
1 answer

CSRF token mismatch for every post request Laravel 9

I am getting Csrf token mismatch error on every post request I am making in the project. I am using ajax at some places and normal form submission at other places. However the error is constant. I have tried several things as suggested on this site…
pyrogrammer
  • 560
  • 3
  • 17
2
votes
2 answers

No hint path defined for [sitemap] laravel 9

I'm using laravel-sitemap in order to create sitemap.xml file for laravel website. Here are route and controller.
Mahdi
  • 664
  • 3
  • 15
  • 35
2
votes
2 answers

function inside a seeder giving Call to undefined function Termwind\ValueObjects\mb_strimwidth()

i have a project where i have a 'habits' table, and that table needs a seeder to give it data, simply put, its a seeder with raw data, and i need to cook it, in other terms i need to process it like so... public function run() { $Habits = [ …
Evinn
  • 33
  • 4
2
votes
1 answer

Laravel Echo working locally but not once deployed

I have my notifications working locally, but once deployed to production, it's not showing anything in the console. @pushonce('custom-scripts')