se468 / laravel-package-boilerplate
Starting point for Laravel package development.
Installs: 11
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 3
Forks: 1
Open Issues: 1
Language:JavaScript
Requires
- php: >=5.5.9
- illuminate/filesystem: ~5.5
- illuminate/mail: ~5.5
- illuminate/support: ~5.5
Requires (Dev)
- mockery/mockery: ~0.9.2|~1.0.0
- orchestra/testbench: ~3.0
- phpunit/phpunit: ~6.0
This package is not auto-updated.
Last update: 2024-11-10 05:56:35 UTC
README
Starting point for Laravel package development. This is developed for Laravel 5.6 and up.
What this package comes with:
Migrations
Model/Controllers
Routes/Views
Webpack / Laravel Mix / VueJS
PHPUnit
Getting Started
In your laravel installation root directory, create folder packages/se468
, and run composer install
In your laravel installation root directory, in composer.json
, add the package namespace:
"psr-4": {
"App\\": "app/",
"se468\\PackageBoilerplate\\" : "packages/se468/laravel-package-boilerplate/src"
}
In config/app.php
, in the providers array, add
se468\PackageBoilerplate\PackageServiceProvider::class,
Run these commands to set up the dependencies:
composer install
Go to route /package-boilerplate
and see if you see Hello world. If you did, congratulations!
Setting up webpack and laravel-mix
In your package directory, run the following commands.
npm install
npm install webpack -D
Now try running:
npm run dev
and check if it creates compiled js/css in public directory.
Then, run php artisan vendor:publish --tag=public --force
to publish your assets.
Rename
Rename everything to match your own:
- Your Github ID - example: se468
- PackageNamespace - example: LaravelPackageBoilerplate
- Your Package Folder - example: laravel-package-boilerplate
Checklist Inside Laravel:
1. composer.json
2. config/app.php
For your package:
1. Rename packages/se468 to your own github id
2. PackageServiceProvider
3. composer.json
4. anywhere else you need to change
Remove any features you don't need from the boilerplate.