1. Go to this page and download the library: Download wanmigs/laravel-status 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/ */
wanmigs / laravel-status example snippets
namespace App;
use Illuminate\Database\Eloquent\Model;
use Fligno\User\Traits\HasStatus
class Flight extends Model
{
use HasStatus;
}
Schema::table('users', function (Blueprint $table) {
$table->boolean('is_active')->default(0);
});
if ($user->isActive()) {
//
}
namespace App\Http\Controllers;
use Fligno\User\Traits\ManageStatus;
class UserController extends Controller
{
use ManageStatus;
protected $model = 'App\User';
}