PHP code example of gnu / scaffy-laravel
1. Go to this page and download the library: Download gnu/scaffy-laravel 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/ */
gnu / scaffy-laravel example snippets
use Gnu\Scaffy\Laravel\Ports\DatabasePort;
use App\Adapters\CustomPostgresAdapter;
$this->app->bind(DatabasePort::class, fn () => new CustomPostgresAdapter());
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class User extends Model
{
protected $fillable = [
'id',
'name',
'email'
];
public $timestamps = false;
public function getTable()
{
return 'dbo.users';
}
}
bash
php artisan scaffy:generate --schema=your_schema