You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

37 lines
858 B

<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
require_once app_path().'/Helpers/helpers.php';
require_once app_path().'/Helpers/date_time.php';
\Validator::extend('not_exists', function ($attribute, $value, $parameters) {
return \DB::table($parameters[0])
->where($parameters[1], $value)
->count() < 1;
});
}
/**
* Register any application services.
*
* @return void
*/
public function register()
{
if ($this->app->environment() == 'local') {
$this->app->register(\Barryvdh\Debugbar\ServiceProvider::class);
}
}
}