This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Modules\Administrators\Requests; | |
use App\Http\Contracts\Baggable; | |
use App\Http\Requests\BaseFormRequest; | |
use App\Modules\Administrators\Bags\AdministratorBag; | |
use Illuminate\Validation\Rule; | |
class StoreAdministratorRequest extends BaseFormRequest implements Baggable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Tests\Feature\Administrators; | |
use Illuminate\Foundation\Testing\WithFaker; | |
use Illuminate\Support\Facades\Hash; | |
use App\Eloquent\Auth\Administrator; | |
use App\Eloquent\Department; | |
use Tests\Concerns\AuthenticatesAdmin; | |
use Tests\TestCase; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Requests; | |
use Illuminate\Http\Request; | |
class BaseRequest extends Request | |
{ | |
public function expectsJson() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Models\Concerns; | |
trait Paginatable | |
{ | |
/** | |
* @var int | |
*/ | |
private $pageSizeLimit = 100; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// ... | |
/** | |
* @param \Illuminate\Http\Request | |
* @return mixed | |
*/ | |
public function __invoke(Request $request) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//... | |
/** | |
* @param \Illuminate\Http\Request | |
* @return mixed | |
*/ | |
public function __invoke(Request $request) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Models\Main; | |
use App\Models\MainModel; | |
use Illuminate\Support\Facades\Config; | |
class Company extends MainModel | |
{ | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Models\Main; | |
use Illuminate\Notifications\Notifiable; | |
use Illuminate\Foundation\Auth\User as Authenticatable; | |
class User extends Authenticatable | |
{ | |
use Notifiable; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Route::get('/posts', function () { | |
return \App\Models\Tenant\Post::all(); | |
})->middleware(\App\Http\Middleware\Tenant::class); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
use Illuminate\Support\Facades\Auth; | |
class Tenant | |
{ | |
/** |