I'm implementing IPB4 in my Laravel project, and for this I put in the boot (AppServiceProvider) code to see if the user is logged in the forum.
$url_base = \IPS\Settings::i()->base_url;
\IPS\Session\Front::i();
$avatar = $url_base."uploads/".\IPS\Member::loggedIn()->pp_main_photo;
$member = \IPS\Member::loggedIn()->member_id;
$key = \IPS\Session::i()->csrfKey;
Everything works correctly, only when I use composer, I always get this error:
c:\xampp\htdocs\lv>php artisan serve
[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'IPS\Settings' not found
When i do every anything... php artisan serve, composer update, install package... In order to continue, I have to comment on the code... Because otherwise, I get the error. If commenting on the code entered in boot (AppServiceProvider) composer works correctly, I do something wrong..
I solved by inserting in composer.json: