This site is for tech Q&A. Please keep your posts focused on the subject at hand.

Ask one question at a time. Don't conflate multiple problems into a single question.

Make sure to include all relevant information in your posts. Try to avoid linking to external sites.

Links to documentation are fine, but in addition you should also quote the relevant parts in your posts.

1 vote

Presently, I am attempting to perform my first migration on a PHP Laravel website I am creating. I have created a user:

MariaDB [ (none) ]> CREATE USER 'homestead'@'localhost' IDENTIFIED BY 'secret';

Then I have added a CreateDatabaseCommand as explained here:

But when I try to execute the command it fails:

ubuntu@ip-123-342-112-224:/var/www/mywebsite$ ./artisan make:database ledca


  Target class [App\Console\CreateDatabaseCommand] does not exist.

  at vendor/laravel/framework/src/Illuminate/Container/Container.php:916
    913▕         try {
    914▕             $reflector = new ReflectionClass($concrete);
    915▕         } catch (ReflectionException $e) {
  ➜ 916▕             throw new BindingResolutionException("Target class [$concrete] does not exist.", 0, $e);
    917▕         }
    919▕         // If the type is not instantiable, the developer is attempting to resolve
    920▕         // an abstract type such as an Interface or Abstract Class and there is

      +10 vendor frames 

  11  artisan:37
in Sysadmin
edited by
by (15)
1 2
edit history

Please log in or register to answer this question.

1 Answer

0 votes

Removed the command from Kernel.php, then executed these commands:

php artisan cache:clear
php artisan config:clear
by (15)
1 2
edit history