Create CI testing

This commit is contained in:
Deon George
2021-06-15 22:19:14 +10:00
parent 4011b2a82d
commit 292040cef7
14 changed files with 356 additions and 44 deletions

View File

@@ -11,4 +11,14 @@ class HomeController extends Controller
return view('domain.view')
->with('o',$o);
}
/**
* System Setup
*
* @note: Protected by Route
*/
public function setup()
{
}
}

View File

@@ -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 */

View File

@@ -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;
});
}
}