commsexpress / smart-entities
There is no license information available for the latest version (dev-relation_and_timestamp_bugfixes) of this package.
A micro-framework for extending Laravel using the Smart Entity pattern
dev-relation_and_timestamp_bugfixes
2018-03-12 10:37 UTC
Requires
- php: ^7.0
- commsexpress/smart-entities: @dev
- illuminate/config: ~5.5
- illuminate/database: ~5.5.0
- illuminate/support: ~5.5.0
Requires (Dev)
- orchestra/testbench: ~3.0
- phpunit/phpunit: ~6.2
This package is auto-updated.
Last update: 2025-12-13 05:31:12 UTC
README
Creating an entity:
- Run
php artisan make:smart {name}from the command line. - The command accepts an optional second argument for the entity's
{domain}. The domain will determine the repository file structure (repos within the same domain are grouped) and default Service. It defaults to the{name}argument. - The command accepts the following options:
-cor--controller-ror--resourcefor a resourceful controller-sor--service-mor--migration
Deleting an entity:
- Run
php artisan del:smart {name}from the command line. - The command accepts an optional second argument for the entity's
{domain}. - The command accepts a
-for--forceoption if you wish to delete the domain's repo folders (along with anything in them)
Creating a user entity:
- Run
php artisan make:smartauthfrom the command line. Add the following to App\Providers\AuthServiceProvider in the boot function below $this->registerPolicies(): `Auth::provider('smartprovider', function() {
return new SmartAuthProvider($this->app['hash'], app()->make(\App\Services\UserService::class));});`
In config/auth: 1) Change guards.web.provider to 'smart' 2) Add the following to the providers array: `'smart' => [
'driver' => 'smartprovider', 'model' => App\Entities\UserEntity::class,]`
TODO
- check withTrashed as a global scope?
- put fillable attributes on the entity
- replace references to App with DummyRootNamespace