I'm currently developing a simple composer package for a laravel application. The package contains 5 php files and as soon as it gets installed these files should be copied in a new folder inside of the laravel app.
To do so I created a new command which should run the moveFiles function but I guess I didn't configure it correctly - when I try to run it I get - Command "move-files" is not defined. Please help!
ServiceProvider class:
class ThemeServiceProvider extends ServiceProvider {
protected $commands = ['mysteryreloaded\copytheme\Commands\MoveFiles'];
public function boot() {
}
public function register() {
$this->commands($this->commands);
}
}
Command class:
class MoveFiles extends Command {
protected $signature = 'move-files';
public function handle() {
$this->info(FilePacker::move());
}
}