Downloads
Stars
Version
The Original Package is Reliese Laravel.
Current Version is Beta.
Required Pecl Package:
This is Customized Package.
Model::fromPk(Pk);
Model::fromPk([multiplePK1, multiplePK2]);
This package expects that you are using Laravel 5.1 or above.
You will need to import the yoshikids/laravel-model
package via composer:
composer require yoshikids/laravel-model
Add the service provider to your config/app.php
file within the providers
key:
// ...
'providers' => [
/*
* Package Service Providers...
*/
\Yoshikids\Laravel\Providers\YoshikidsServiceProvider::class
],
// ...
If you wish to enable generators only for your local environment, you should install it via composer using the --dev option like this:
composer require yoshikids/laravel-models --dev
Then you'll need to register the provider in app/Providers/AppServiceProvider.php
file.
public function register()
{
if ($this->app->environment() == 'local') {
$this->app->register(YoshikidsServiceProvider::class);
}
}
Add the models.php
configuration file to your config
directory and clear the config cache:
php artisan vendor:publish --tag=yoshikids-models
php artisan config:clear
Assuming you have already configured your database, you are now all set to go.
php artisan yoshikids:models
php artisan yoshikids:models --table=users
php artisan yoshikids:models --connection=mysql
php artisan yoshikids:models --schema=shop
To change the scaffolding behaviour you can make config/models.php
configuration file
fit your database needs. Check it out ;-)
For the time being, this package only supports MySQL databases.