binshops / laravel-blog

Laravel Blog Package/ Laravel CMS. Easiest way to add a blogging system to your Laravel website. Laravel Blog.
https://www.binshops.com
MIT License
428 stars 134 forks source link

Attempt to read property "locale" on null #89

Closed rabol closed 1 year ago

rabol commented 1 year ago

Hi

just did a new Laravel app

Laravel new blog composer require laravel/breeze --dev php artisan breeze:install

and then the steps in the readme

when I access the url: http://blog.test/blog_admin/ i get the error the error comes from LoadLanguage.php when it try the set the language the first time

quick fix was like this:

        $request->attributes->add([
            'locale' => $lang->locale ?? 'en',
            'language_id' => $lang->id ?? 0
        ]);
samberrry commented 1 year ago

thanks for reporting, it will be fixed soon.

samberrry commented 1 year ago

@rabol did you also call /blog_admin/setup, I think you missed this step.

rabol commented 1 year ago

I did not, that would solve the issue - thanks

samberrry commented 1 year ago

welcome. I close the issue. have a great day.