This file contains hidden or 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\Support\ViewPresenter; | |
use Carbon\Carbon; | |
use Illuminate\Support\Str; | |
abstract class Presenter | |
{ | |
/** |
This file contains hidden or 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\Core\Providers; | |
use Illuminate\Contracts\Auth\Access\Gate as GateContract; | |
use Illuminate\Support\ServiceProvider; | |
use App\Domains\Users\User; | |
class AuthServiceProvider extends ServiceProvider | |
{ |
This file contains hidden or 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
Show hidden characters
{ | |
"bootstrapped": true, | |
"in_process_packages": | |
[ | |
], | |
"installed_packages": | |
[ | |
"Emmet", | |
"Package Control", | |
"SublimeLinter", |
This file contains hidden or 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\Domains\Clients | |
use Artesaos\Warehouse\BaseRepository; | |
class ClientsRepository extends BaseRepository | |
{ | |
public function getInvoices(Client $client, $take = 15, $paginate = false) | |
{ |
This file contains hidden or 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\Domains\Tenants\Repositories\Traits; | |
use App\Domains\Tenants\Tenant; | |
trait RegularTenantRepository | |
{ | |
/** | |
* @var Tenant |
This file contains hidden or 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\Domains\Tenants\Repositories\Users; | |
use App\Domains\Users\Repositories\UsersRepository as OriginalUsersRepository; | |
use App\Domains\Tenants\Repositories\Traits\RegularTenantRepository; | |
class UsersRepository extends OriginalUsersRepository | |
{ | |
use RegularTenantRepository; |
This file contains hidden or 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\Domains\Users; | |
use App\Support\Repositories\BaseRepository; | |
use Carbon\Carbon; | |
class UsersRepository extends BaseRepository | |
{ | |
protected $modelClass = User::class; |
This file contains hidden or 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\Support\Repositories; | |
use Illuminate\Database\Eloquent\Builder as EloquentQueryBuilder; | |
use Illuminate\Database\Eloquent\Collection as EloquentCollection; | |
use Illuminate\Database\Query\Builder as QueryBuilder; | |
use Illuminate\Pagination\AbstractPaginator as Paginator; | |
abstract class BaseRepository |
This file contains hidden or 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 | |
// https://github.com/laravel/framework/blob/5.1/src/Illuminate/Foundation/helpers.php#L56 | |
// https://github.com/laravel/framework/blob/5.1/src/Illuminate/Container/Container.php#L1128 | |
// https://github.com/laravel/framework/blob/5.1/src/Illuminate/Container/Container.php#L614 | |
$query = app(User::class)->newQuery(); | |
$query = app()->make(User::class)->newQuery(); | |
$query = app()->make('\App\Domains\Users\User')->newQuery(); | |
$modelClass = User::class; | |
$query = app($modelClass)->newQuery(); |
This file contains hidden or 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 | |
// chain | |
// https://github.com/laravel/framework/blob/5.1/src/Illuminate/Database/Eloquent/Model.php#L3447 | |
// https://github.com/laravel/framework/blob/5.1/src/Illuminate/Database/Eloquent/Model.php#L3429 | |
$user = User::where('email', '[email protected]')->where('is_dead', false)->first(); | |
$bastards = User::where('country', 'westeros')->whereNull('father')->get(); | |
// https://github.com/laravel/framework/blob/5.1/src/Illuminate/Database/Eloquent/Model.php#L574 | |
$query = User::query(); | |
$query->where('email', '[email protected]'); |