Laravel Package

von Andreas

package-skeleton-laravel

 

  1. git clone https://github.com/spatie/package-skeleton-laravel.git laravel-contao-brigde (am Besten nach www/packages)
  2. .github entfernen, wenn nicht benötigt ..
  3. .git entferne, wir wollen ja ein eigenes draus machen
  4. projekt heisst hier laravel-contao-brigde.  alle "skeleton" in files anpassen
  5. "php ./configure.php" (nicht configure-skeleton.sh .. existiert nicht mehr)
  6. im Package erstmal kein composer update machen.
  7. compser.json (package) muss
    "minimum-stability": "dev",
    "prefer-stable": true
    beinhalten. ist aber standart

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

"repositories": {
"swoop/laravel-contao-brigde": {
"type": "path",
"url": "../../packages/laravel-contao-brigde",
"options": {
"symlink": true
}
}
},

 

Zurück zur Newsübersicht