Closed webhostingsrbijaRS closed 3 years ago
Try running composer dump-autoload
and see if the error persists.
The same. Also tried clear cache
composer dump-autoload
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Discovered Package: barryvdh/laravel-dompdf
Discovered Package: diglactic/laravel-breadcrumbs
Also i tried in layout to call Breadcrumbs::generate() the same like in first comment
Hm, not sure what's happening here. If you feel comfortable sharing your project code (private, can add me temporarily), I can try and debug for you.
When you get Class 'Diglactic\Breadcrumbs\Breadcrumbs' not found
inside your controller, are you importing it with a use Diglactic\Breadcrumbs\Breadcrumbs
statement?
Unfortunately there are a lot of sensitive data so i can't share source code.
Yes use Diglactic\Breadcrumbs\Breadcrumbs;
is at top
namespace App\Http\Controllers;
use App\Models\DataModel;
use Diglactic\Breadcrumbs\Breadcrumbs;
use Illuminate\Http\Request;
use App\Http\Controllers\MailController;
use Illuminate\Support\Facades\Auth;
Even (PHPStorm) see that class (screenshot below) screenshot1 screenshot2
What composer --version
are you running?
composer --version Composer version 2.0.9 2021-01-27 16:09:27
The other thing you might try is rm -rf
your vendor
folder (maybe even composer.lock
) and running composer install
again. Let me double-verify on my machine with Composer 2.
Working for me on Composer 2. You're running v6.1.0 of breadcrumbs? I can't really help further without seeing your code, but you might try creating a brand new Laravel project and seeing if the problem persists. That would tell you if something outside of this package is causing this.
Tried also with vender and composer.lock. First i had composer 1 but i updated i tought that will fix this. OK thank you for your time.
This still persist for me :(
@mariapaulinar This hasn't been a reproducible issue. What version of the following are you using?
Can you share code that caused this exception to be thrown?
Hello. Here my config:
Composer:
PHP:
Laravel:
Laravel Breadcrumb:
@mariapaulinar Thanks. What are the steps leading up to to this exception being thrown?
My error! I wasn't using the namespace on breadcrumbs.php. Sorry!
Hello i installed, tried but i get error: Class Breadcrumbs not found in view blade file. I tried: #class-breadcrumbs-not-found
Discovered Package: diglactic/laravel-breadcrumbs
routes/breadcrumbs.php
I tried to set in controller like:
Then i get
Class 'Diglactic\Breadcrumbs\Breadcrumbs' not found
what i also can do?Laravel 8 PHP 7.4 Apache OS CentOS 8