Laravel Package
von Andreas
package-skeleton-laravel
- git clone https://github.com/spatie/package-skeleton-laravel.git laravel-contao-brigde (am Besten nach www/packages)
- .github entfernen, wenn nicht benötigt ..
- .git entferne, wir wollen ja ein eigenes draus machen
- projekt heisst hier laravel-contao-brigde. alle "skeleton" in files anpassen
- "php ./configure.php" (nicht configure-skeleton.sh .. existiert nicht mehr)
- im Package erstmal kein composer update machen.
- compser.json (package) muss
"minimum-stability": "dev",beinhalten. ist aber standart
"prefer-stable": true
Enable PhpStan? (Y/n): -> Y
Enable Laravel Pint? (Y/n): ->Y
Enable Dependabot? (Y/n): -> N
Use Ray for debugging? (Y/n): ->N
Use automatic changelog updater workflow? (Y/n): -> N
/ ->hasViews()
// ->hasViewComponent('spatie', Alert::class)
// ->hasViewComposer('*', MyViewComposer::class)
// ->sharesDataWithAllViews('downloads', 3)
// ->hasTranslations()
// ->hasAssets()
// ->publishesServiceProvider('MyProviderName')
// ->hasRoute('web')
->hasMigration('create_laravel-contao-brigde_table')
->hasCommand(LaravelContaoBrigdeCommand::class)
->hasInstallCommand(function(InstallCommand $command) {
$command
->publishConfigFile()
->publishAssets()
->publishMigrations()
->copyAndRegisterServiceProviderInApp()
;
//->askToStarRepoOnGitHub();
});
;
wobei den Teil erst später hinzufügen, nach dem ersten composer Update
->hasInstallCommand(function(InstallCommand $command) {
$command
->publishConfigFile()
->publishAssets()
->publishMigrations()
->copyAndRegisterServiceProviderInApp()
;
//->askToStarRepoOnGitHub();
});
env file (main projekt)
falls noch nicht angelegt:
COMPOSER_ROOT_VERSION=dev-master
rein schrieben. sonst geht es nicht.
und: in phpstorm den block
"swoop/laravel-contao-brigde": {
"type": "path",
"url": "../../packages/laravel-contao-brigde",
"options": {
"symlink": true
}
}
},
