first upload all files
This commit is contained in:
23
Modules/Support/Providers/EloquentMacroServiceProvider.php
Normal file
23
Modules/Support/Providers/EloquentMacroServiceProvider.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Support\Providers;
|
||||
|
||||
use Illuminate\Database\Query\Builder;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class EloquentMacroServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
Builder::macro('resetOrders', function () {
|
||||
$this->{$this->unions ? 'unionOrders' : 'orders'} = null;
|
||||
|
||||
return $this;
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user