PHP code example of rapid / laplus

1. Go to this page and download the library: Download rapid/laplus 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/ */

    

rapid / laplus example snippets


public function present()
{
    $this->id();
    $this->text('title');
    $this->string('password')->cast('hashed')->hidden();
    $this->belongsTo(Artist::class)->cascadeOnDelete();
}

class User extends Model
{
    use HasPresent;
}

//protected $fillable = ['name', 'email', 'password'];
//protected $hidden = ['password', 'remember_token'];
//protected function casts() { ... }

protected function present(Present $present)
{
    $present->id();
    $present->string('name');
    $present->string('email')->unique();
    $present->timestamp('email_verified_at')->nullable();
    $present->password();
    $present->rememberToken();
    $present->timestamps();
}
shell
php artisan vendor:publish --tag=laplus
shell
php artisan make:user-present
shell
php artisan make:model+ Name
shell
php artisan generate+
shell
php artisan regenerate+
shell
php artisan migrate+