🙂 Extended Default Config
This commit is contained in:
parent
284f788416
commit
11190d3994
|
|
@ -16,8 +16,7 @@ return [
|
|||
|
||||
'enabled' => env('DEBUGBAR_ENABLED', null),
|
||||
'except' => [
|
||||
'telescope*',
|
||||
'horizon*'
|
||||
'telescope*'
|
||||
],
|
||||
|
||||
/*
|
||||
|
|
@ -124,7 +123,6 @@ return [
|
|||
'config' => false, // Display config settings
|
||||
'cache' => false, // Display cache events
|
||||
'models' => true, // Display models
|
||||
'livewire' => true, // Display Livewire (when available)
|
||||
],
|
||||
|
||||
/*
|
||||
|
|
@ -143,13 +141,12 @@ return [
|
|||
'db' => [
|
||||
'with_params' => true, // Render SQL with the parameters substituted
|
||||
'backtrace' => true, // Use a backtrace to find the origin of the query in your files.
|
||||
'backtrace_exclude_paths' => [], // Paths to exclude from backtrace. (in addition to defaults)
|
||||
'timeline' => false, // Add the queries to the timeline
|
||||
'explain' => [ // Show EXPLAIN output on queries
|
||||
'enabled' => false,
|
||||
'types' => ['SELECT'], // // workaround ['SELECT'] only. https://github.com/barryvdh/laravel-debugbar/issues/888 ['SELECT', 'INSERT', 'UPDATE', 'DELETE']; for MySQL 5.6.3+
|
||||
],
|
||||
'hints' => false, // Show hints for common mistakes
|
||||
'hints' => true, // Show hints for common mistakes
|
||||
],
|
||||
'mail' => [
|
||||
'full_log' => false
|
||||
|
|
@ -202,14 +199,4 @@ return [
|
|||
| To override default domain, specify it as a non-empty value.
|
||||
*/
|
||||
'route_domain' => null,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| DebugBar theme
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Switches between light and dark theme. If set to auto it will respect system preferences
|
||||
| Possible values: auto, light, dark
|
||||
*/
|
||||
'theme' => 'auto',
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?php declare(strict_types=1);
|
||||
<?php
|
||||
|
||||
return [
|
||||
'hosts' => [
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?php declare(strict_types=1);
|
||||
<?php
|
||||
|
||||
return [
|
||||
'refresh_documents' => env('ELASTIC_SCOUT_DRIVER_REFRESH_DOCUMENTS', false),
|
||||
'refresh_documents' => env('ELASTIC_SCOUT_DRIVER_REFRESH_DOCUMENTS', false)
|
||||
];
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ return [
|
|||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Auto Aliased Classes
|
||||
| Alias Whitelist
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Tinker will not automatically alias classes in your vendor namespaces
|
||||
|
|
@ -34,7 +34,7 @@ return [
|
|||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Classes That Should Not Be Aliased
|
||||
| Alias Blacklist
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Typically, Tinker automatically aliases classes as you require them in
|
||||
|
|
|
|||
|
|
@ -2,132 +2,10 @@
|
|||
|
||||
namespace Webkul\Core;
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
use Konekt\Concord\Contracts\Convention;
|
||||
use Konekt\Concord\Conventions\BaseConvention;
|
||||
use Konekt\Concord\Conventions\ConcordDefault;
|
||||
|
||||
class CoreConvention extends BaseConvention implements Convention
|
||||
class CoreConvention extends ConcordDefault
|
||||
{
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function modulesFolder(): string
|
||||
{
|
||||
return 'Modules';
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function modelsFolder(): string
|
||||
{
|
||||
return 'Models';
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function contractsFolder(): string
|
||||
{
|
||||
return 'Contracts';
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function controllersFolder(): string
|
||||
{
|
||||
return 'Http/Controllers';
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function requestsFolder(): string
|
||||
{
|
||||
return 'Http/Requests';
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function resourcesFolder(): string
|
||||
{
|
||||
return 'Http/Resources';
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function contractForRequest(string $requestClass): string
|
||||
{
|
||||
return sprintf(
|
||||
'%s\\Contracts\\Requests\\%s',
|
||||
$this->oneLevelUp($this->oneLevelUp($this->getNamespace($requestClass))),
|
||||
class_basename($requestClass)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function contractForModel(string $modelClass): string
|
||||
{
|
||||
return sprintf(
|
||||
'%s\\Contracts\\%s',
|
||||
$this->oneLevelUp($this->getNamespace($modelClass)),
|
||||
class_basename($modelClass)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function modelForRepository(string $repositoryClass): string
|
||||
{
|
||||
return Str::replaceLast('Repository', '', $repositoryClass);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function modelForProxy(string $proxyClass): string
|
||||
{
|
||||
return Str::replaceLast('Proxy', '', $proxyClass);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function repositoryForModel(string $modelClass): string
|
||||
{
|
||||
return $modelClass . 'Repository';
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function proxyForModel(string $modelClass): string
|
||||
{
|
||||
return $modelClass . 'Proxy';
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function manifestFile(): string
|
||||
{
|
||||
return 'resources/manifest.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function configFolder(): string
|
||||
{
|
||||
return 'resources/config';
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
|
|
@ -135,113 +13,4 @@ class CoreConvention extends BaseConvention implements Convention
|
|||
{
|
||||
return 'Database/Migrations';
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function viewsFolder(): string
|
||||
{
|
||||
return 'resources/views';
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function routesFolder(): string
|
||||
{
|
||||
return 'resources/routes';
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function providersFolder(): string
|
||||
{
|
||||
return 'Providers';
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function enumsFolder(): string
|
||||
{
|
||||
return 'Models';
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function contractForEnum(string $enumClass): string
|
||||
{
|
||||
// Enums are in the same folder as models, so we use the existing method
|
||||
return $this->contractForModel($enumClass);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function proxyForEnum(string $enumClass): string
|
||||
{
|
||||
// Identical with model proxies
|
||||
return $this->proxyForModel($enumClass);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function enumForProxy(string $proxyClass): string
|
||||
{
|
||||
// Identical with model proxies
|
||||
return $this->modelForProxy($proxyClass);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function proxyForEnumContract(string $enumContract)
|
||||
{
|
||||
return $this->proxyForEnum(
|
||||
$this->defaultEnumClassForContract($enumContract)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function proxyForModelContract(string $modelContract): string
|
||||
{
|
||||
return $this->proxyForModel(
|
||||
$this->defaultModelClassForContract($modelContract)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the convention's default enum class for an enum contract
|
||||
*
|
||||
* @param $enumContract
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function defaultEnumClassForContract($enumContract)
|
||||
{
|
||||
return
|
||||
$this->oneLevelUp($this->getNamespace($enumContract))
|
||||
. '\\' . $this->enumsFolder()
|
||||
. '\\' . class_basename($enumContract);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the convention's default model class for a model contract
|
||||
*
|
||||
* @param $modelContract
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function defaultModelClassForContract($modelContract)
|
||||
{
|
||||
return
|
||||
$this->oneLevelUp($this->getNamespace($modelContract))
|
||||
. '\\' . $this->modelsFolder()
|
||||
. '\\' . class_basename($modelContract);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue