- What is edram/laravel-package used for?
- It is a reusable Laravel package foundation for building Edram Laravel extensions. The template includes a service provider, facade, configuration file, migrations, an artisan command, and development scripts. It is intended as a starting scaffold rather than a feature-complete application package, so you copy and extend it for your own package.
- How do I install edram/laravel-package?
- Install it with composer require edram/laravel-package. Then publish the configuration with php artisan vendor:publish --tag=laravel-package-config. If you need the included migrations, publish them with the laravel-package-migrations tag and run php artisan migrate.
- Which Laravel versions does edram/laravel-package support?
- The README does not list an explicit Laravel version matrix, so check the package composer.json constraints and the GitHub Actions test badge before installing. You can also run composer why-not edram/laravel-package to see conflicts in your application. Pin a compatible version in production once you confirm the dependency requirements.
- How do I publish the config and migrations for edram/laravel-package?
- Use php artisan vendor:publish --tag=laravel-package-config to publish the configuration file. Use php artisan vendor:publish --tag=laravel-package-migrations to publish the migrations, then run php artisan migrate. Add the --force flag only when you intentionally want to overwrite existing published files.
- How do I use the LaravelPackage facade or resolve it from the container?
- You can resolve the package with app(Edram\LaravelPackage\LaravelPackage::class) and call echoPhrase on the returned instance. Alternatively, use the facade Edram\LaravelPackage\Facades\LaravelPackage and call LaravelPackage::echoPhrase directly. The container binding is convenient for dependency injection and testing, while the facade is convenient in controllers and views.
- Does edram/laravel-package include an artisan command?
- Yes, the template includes a demo command you can run with php artisan laravel-package. It is scaffolding meant to show how to register and structure a package command. Replace or remove it when building your own package functionality.
- How do I run tests and static analysis for edram/laravel-package?
- Run the test suite with composer test. Run static analysis with composer analyse, and format the code with composer format. The repository also includes a GitHub Actions workflow for tests, so you can verify the setup from the Tests badge.
- Can I use edram/laravel-package as a starting point for my own Laravel package?
- Yes, it is explicitly a Laravel package template for building Edram extensions. Rename the Composer package, update the namespace and service provider, change the config and migration publish tags, and replace the demo facade and command. Also update the README, license, and CI workflow before publishing your own package.
- Is edram/laravel-package safe to use in production?
- Treat it as a template rather than a production feature package, because the included echoPhrase facade and artisan command are demo scaffolding. Remove unused demo code, review the published config and migrations, and pin a compatible version in composer.json. Run your own test suite against the package before deploying it to production.
- What are alternatives to edram/laravel-package for building Laravel packages?
- Common alternatives include the Spatie Laravel package skeleton and similar package templates built around Orchestra Testbench. edram/laravel-package is a minimal Edram-oriented foundation with its own facade, config, migrations, and command examples. Choose based on the test tooling, namespace conventions, and scaffolding you want to maintain.