Answer the question
In order to leave comments, you need to log in
I can't find where I "didn't put a comma" when developing a package for lAravel 5.1?
It seems that I am doing everything right, but my ServiceProvider does not find ...
FatalErrorException in ProviderRepository.php line 146:
Class 'DkWeb\Stats\StatsServiceProvider' not found
{
"name": "dkweb/stats",
"description": "getting data from API",
"license": "MIT",
"authors": [
{
"name": "DkWeb",
"email": "[email protected]"
}
],
"require": {},
"autoload": {
"classmap": [],
"files": [],
"psr-4": {
"DkWeb\\Stats": "src/"
}
}
}
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/",
"DkWeb\\Stats\\": "packages/DkWeb/Stats/src"
}
},
<?php
namespace DkWeb\Stats;
use Illuminate\Support\ServiceProvider;
class StatsServiceProvider extends ServiceProvider
{
public function register()
{
$this->app->bind('Stats', function () {
return new Stats;
});
}
public function boot(){
require __DIR__ . '/Http/routes.php';
}
}
Answer the question
In order to leave comments, you need to log in
Hmm ... the error turned out to be even more fun - I created the packages folder in the vendor folder ... but it was necessary at the root ..
inattention (
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question