1. Go to this page and download the library: Download bastinald/ui 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/ */
bastinald / ui example snippets
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Schema\Blueprint;
class User extends Model
{
public function migration(Blueprint $table)
{
$table->id();
$table->string('name');
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->rememberToken();
$table->timestamp('created_at')->nullable();
$table->timestamp('updated_at')->nullable();
}
}
use Illuminate\Support\Facades\Route;
use Livewire\Component;
class Home extends Component
{
public function route()
{
return Route::get('/home', static::class)
->name('home')
->middleware('auth');
}
}
use Bastinald\Ui\Traits\HasHashes;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use HasHashes;
protected $hashes = ['password'];
}