<commit_before><?php namespace Bkwld\Decoy;

use App;
use Bkwld\Decoy\Observers\NotFound;
use Bkwld\Decoy\Observers\Validation;
use Bkwld\Decoy\Fields\Former\MethodDispatcher;
use Config;
use Former\Former;
use Illuminate\Contracts\Debug\ExceptionHandler;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Foundation\AliasLoader;
use Illuminate\Foundation\ProviderRepository;
use Illuminate\Support\ServiceProvider as BaseServiceProvider;
use Symfony\Component\Yaml\Parser;

class ServiceProvider extends BaseServiceProvider {

	/**
	 * Bootstrap the application events.
	 *
	 * @return void
	 */
	public function boot() {
		
		// Publish config files
		$this->publishes([
			 __DIR__.'/../../config' => config_path('decoy')
		], 'config');

		// Publish migrations
		$this->publishes([
			__DIR__.'/../../migrations/' => database_path('migrations')
		], 'migrations');

		// Define constants that Decoy uses
		if (!defined('FORMAT_DATE'))     define('FORMAT_DATE', 'm/d/y');
		if (!defined('FORMAT_DATETIME')) define('FORMAT_DATETIME', 'm/d/y g:i a T');
		if (!defined('FORMAT_TIME'))     define('FORMAT_TIME', 'g:i a T');		

		// Register the routes AFTER all the app routes using the "before" register.  
		// Unless the app is running via the CLI where we want the routes reigsterd 
		// for URL generation.
		if (App::runningInConsole()) $router->registerAll();
		else $this->app->before(array($router, 'registerAll'));

		// Do bootstrapping that only matters if user has requested an admin URL
		if ($this->app['decoy']->handling()) $this->usingAdmin();

		// Wire up model event callbacks even if request is not for admin.  Do this
		// after the usingAdmin call so that the callbacks run after models are
		// mutated by Decoy logic.  This is important, in particular, so the<commit_msg>Specifying the public assets and views dirs<commit_after><?php namespace Bkwld\Decoy;

use App;
use Bkwld\Decoy\Observers\NotFound;
use Bkwld\Decoy\Observers\Validation;
use Bkwld\Decoy\Fields\Former\MethodDispatcher;
use Config;
use Former\Former;
use Illuminate\Contracts\Debug\ExceptionHandler;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Foundation\AliasLoader;
use Illuminate\Foundation\ProviderRepository;
use Illuminate\Support\ServiceProvider as BaseServiceProvider;
use Symfony\Component\Yaml\Parser;

class ServiceProvider extends BaseServiceProvider {

	/**
	 * Bootstrap the application events.
	 *
	 * @return void
	 */
	public function boot() {
		
		// Publish config files
		$this->publishes([
			 __DIR__.'/../../config' => config_path('decoy')
		], 'config');

		// Publish assets
		$this->publishes([
			 __DIR__.'/../../../public' => public_path('packages/bkwld/decoy')
		], 'assets');

		// Publish migrations
		$this->publishes([
			__DIR__.'/../../migrations/' => database_path('migrations')
		], 'migrations');

		// Register views
		$this->loadViewsFrom(__DIR__.'/../../views', 'decoy');

		// Define constants that Decoy uses
		if (!defined('FORMAT_DATE'))     define('FORMAT_DATE', 'm/d/y');
		if (!defined('FORMAT_DATETIME')) define('FORMAT_DATETIME', 'm/d/y g:i a T');
		if (!defined('FORMAT_TIME'))     define('FORMAT_TIME', 'g:i a T');		

		// Register the routes AFTER all the app routes using the "before" register.  
		// Unless the app is running via the CLI where we want the routes reigsterd 
		// for URL generation.
		if (App::runningInConsole()) $router->registerAll();
		else $this->app->before(array($router, 'registerAll'));

		// Do bootstrapping that only matters if user has requested an admin URL
		if ($this->app['decoy']->handling()) $this->usingAdmin();

		// Wire up model event callbacks even if request is not for admin.  Do this
		// after the usingAdmin call so that the callbacks run after models are
		// mutated by Decoy logic.  This is important, in particular, so the
{'fraction_non_alphanumeric': 0.13797600417318728, 'fraction_numerical': 0.0, 'mean_word_length': 4.032808398950131, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 26, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '956040', 'n_tokens_mistral': 1220, 'n_tokens_neox': 1147, 'n_words': 343}