Create CI testing
This commit is contained in:
@@ -11,4 +11,14 @@ class HomeController extends Controller
|
||||
return view('domain.view')
|
||||
->with('o',$o);
|
||||
}
|
||||
|
||||
/**
|
||||
* System Setup
|
||||
*
|
||||
* @note: Protected by Route
|
||||
*/
|
||||
public function setup()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@@ -2,13 +2,14 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
use App\Traits\ScopeActive;
|
||||
|
||||
class Domain extends Model
|
||||
{
|
||||
use ScopeActive;
|
||||
use HasFactory,ScopeActive;
|
||||
|
||||
/* SCOPES */
|
||||
|
||||
|
@@ -5,26 +5,30 @@ namespace App\Providers;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
||||
|
||||
use App\Models\User;
|
||||
|
||||
class AuthServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* The policy mappings for the application.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $policies = [
|
||||
'App\Model' => 'App\Policies\ModelPolicy',
|
||||
];
|
||||
/**
|
||||
* The policy mappings for the application.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $policies = [
|
||||
'App\Model' => 'App\Policies\ModelPolicy',
|
||||
];
|
||||
|
||||
/**
|
||||
* Register any authentication / authorization services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
$this->registerPolicies();
|
||||
/**
|
||||
* Register any authentication / authorization services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
$this->registerPolicies();
|
||||
|
||||
//
|
||||
}
|
||||
Gate::define('admin',function (User $o) {
|
||||
return $o->admin == TRUE;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user