1. Go to this page and download the library: Download vleroy/smart library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
vleroy / smart example snippets
namespace App;
use Deiucanta\Smart\Field;
use Deiucanta\Smart\Model;
class Product extends Model
{
public function fields()
{
return [
Field::make('id')->increments(),
Field::make('sku')->string()->fillable()->>timestamp()->nullable()->index(),
Field::make('updated_at')->timestamp()->nullable()->index(),
];
}
}
return [
'models' => [
\App\Product::class,
]
];
php artisan smart:model Product
php artisan smart:migration
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.