forked from orchidsoftware/orchid.software
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
319 changed files
with
29,342 additions
and
57,041 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
{ | ||
"plugins": [ | ||
["prismjs", { | ||
"languages": ["javascript", "php"] | ||
}] | ||
] | ||
} | ||
"plugins": [ | ||
["prismjs", { | ||
"languages": ["javascript", "css", "markup", "php", "ini", "yaml", "bash", "sql"], | ||
"css": false | ||
}] | ||
] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.{yml,yaml}] | ||
indent_size = 2 | ||
|
||
[docker-compose.yml] | ||
indent_size = 4 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
APP_NAME=Laravel | ||
APP_ENV=local | ||
APP_KEY= | ||
APP_DEBUG=true | ||
APP_URL=http://localhost | ||
|
||
LOG_CHANNEL=stack | ||
LOG_DEPRECATIONS_CHANNEL=null | ||
LOG_LEVEL=debug | ||
|
||
DB_CONNECTION=mysql | ||
DB_HOST=127.0.0.1 | ||
DB_PORT=3306 | ||
DB_DATABASE=laravel | ||
DB_USERNAME=root | ||
DB_PASSWORD= | ||
|
||
BROADCAST_DRIVER=log | ||
CACHE_DRIVER=file | ||
FILESYSTEM_DRIVER=local | ||
QUEUE_CONNECTION=sync | ||
SESSION_DRIVER=file | ||
SESSION_LIFETIME=120 | ||
|
||
MEMCACHED_HOST=127.0.0.1 | ||
|
||
REDIS_HOST=127.0.0.1 | ||
REDIS_PASSWORD=null | ||
REDIS_PORT=6379 | ||
|
||
MAIL_MAILER=smtp | ||
MAIL_HOST=mailhog | ||
MAIL_PORT=1025 | ||
MAIL_USERNAME=null | ||
MAIL_PASSWORD=null | ||
MAIL_ENCRYPTION=null | ||
MAIL_FROM_ADDRESS=null | ||
MAIL_FROM_NAME="${APP_NAME}" | ||
|
||
AWS_ACCESS_KEY_ID= | ||
AWS_SECRET_ACCESS_KEY= | ||
AWS_DEFAULT_REGION=us-east-1 | ||
AWS_BUCKET= | ||
AWS_USE_PATH_STYLE_ENDPOINT=false | ||
|
||
PUSHER_APP_ID= | ||
PUSHER_APP_KEY= | ||
PUSHER_APP_SECRET= | ||
PUSHER_APP_CLUSTER=mt1 | ||
|
||
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" | ||
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
* text=auto | ||
*.css linguist-vendored | ||
*.scss linguist-vendored | ||
*.js linguist-vendored | ||
CHANGELOG.md export-ignore |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
/build_local/ | ||
/build_staging/ | ||
/build_production/ | ||
/build_staging/ | ||
/node_modules/ | ||
/vendor/ | ||
.DS_Store | ||
./cache/ | ||
.idea | ||
/node_modules | ||
/public/hot | ||
/public/storage | ||
/storage/*.key | ||
/vendor | ||
.env | ||
.env.backup | ||
.phpunit.result.cache | ||
docker-compose.override.yml | ||
Homestead.json | ||
Homestead.yaml | ||
npm-debug.log | ||
yarn-error.log | ||
/.idea | ||
/.vscode |
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?php | ||
|
||
namespace App\Console\Commands; | ||
|
||
use Illuminate\Console\Command; | ||
use Illuminate\Support\Str; | ||
use Carbon\Carbon; | ||
use Spatie\Sitemap\Sitemap; | ||
use Spatie\Sitemap\Tags\Url; | ||
|
||
class GenerateSiteMap extends Command | ||
{ | ||
/** | ||
* The name and signature of the console command. | ||
* | ||
* @var string | ||
*/ | ||
protected $signature = 'make:sitemap'; | ||
|
||
/** | ||
* The console command description. | ||
* | ||
* @var string | ||
*/ | ||
protected $description = 'Create and generate sitemaps'; | ||
|
||
/** | ||
* Execute the console command. | ||
* | ||
* @return int | ||
*/ | ||
public function handle() | ||
{ | ||
$disk = config('export.disk'); | ||
$files = \Storage::disk($disk)->allFiles(); | ||
|
||
$sitemap = Sitemap::create(); | ||
|
||
collect($files)->filter(function (string $file) { | ||
return Str::of($file)->endsWith('.html'); | ||
})->map(function (string $file) { | ||
return (string) Str::of($file)->remove('index.html'); | ||
})->map(function ($path) { | ||
return Url::create($path) | ||
->setLastModificationDate(Carbon::yesterday()) | ||
->setChangeFrequency(Url::CHANGE_FREQUENCY_DAILY); | ||
})->each(function (Url $url) use ($sitemap) { | ||
$sitemap->add($url); | ||
}); | ||
|
||
|
||
$sitemap->writeToDisk($disk, 'sitemap.xml'); | ||
|
||
return 0; | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
namespace App\Console; | ||
|
||
use Illuminate\Console\Scheduling\Schedule; | ||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel; | ||
|
||
class Kernel extends ConsoleKernel | ||
{ | ||
/** | ||
* Define the application's command schedule. | ||
* | ||
* @param \Illuminate\Console\Scheduling\Schedule $schedule | ||
* @return void | ||
*/ | ||
protected function schedule(Schedule $schedule) | ||
{ | ||
// $schedule->command('inspire')->hourly(); | ||
} | ||
|
||
/** | ||
* Register the commands for the application. | ||
* | ||
* @return void | ||
*/ | ||
protected function commands() | ||
{ | ||
$this->load(__DIR__ . '/Commands'); | ||
|
||
require base_path('routes/console.php'); | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<?php | ||
|
||
namespace App; | ||
|
||
use Illuminate\Support\Facades\Storage; | ||
use Illuminate\Support\Facades\URL; | ||
use Illuminate\Support\Str; | ||
use Symfony\Component\Yaml\Yaml; | ||
|
||
class Docs | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
protected $locale; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
protected $path; | ||
|
||
/** | ||
* @param string $locale | ||
* @param string $path | ||
*/ | ||
public function __construct(string $locale, string $path) | ||
{ | ||
app()->setLocale($locale); | ||
|
||
$this->locale = $locale; | ||
$this->path = "/$locale/$path.md"; | ||
} | ||
|
||
/** | ||
* @param string $view | ||
* | ||
* @return \Illuminate\Contracts\View\View | ||
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException | ||
*/ | ||
public function view(string $view) | ||
{ | ||
$page = Storage::disk('docs')->get($this->path); | ||
|
||
$variables = Str::of($page)->after('---')->before('---'); | ||
|
||
$variables = Yaml::parse($variables); | ||
|
||
$all = collect()->merge($variables)->merge([ | ||
'content' => Str::of($page)->after('---')->after('---')->markdown(), | ||
'edit' => $this->editLinkGitHub(), | ||
]); | ||
|
||
return view($view, $all); | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
protected function editLinkGitHub() | ||
{ | ||
return "https://github.com/orchidsoftware/orchid.software/edit/master/source$this->path"; | ||
} | ||
|
||
/** | ||
* @param string $locale | ||
* | ||
* @return string | ||
*/ | ||
public static function ahref(string $locale) | ||
{ | ||
$pattern = "/$locale/"; | ||
|
||
$url = str_ireplace([ | ||
config('app.url') . '/ru', | ||
config('app.url') . '/en', | ||
], $pattern, URL::current()); | ||
|
||
if (!Str::contains($url, $pattern)) { | ||
$url .= $pattern; | ||
} | ||
|
||
$url = config('app.url') . str_replace('//', '/', parse_url($url, PHP_URL_PATH)); | ||
|
||
return Str::finish($url, '/'); | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
|
||
namespace App\Exceptions; | ||
|
||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; | ||
use Throwable; | ||
|
||
class Handler extends ExceptionHandler | ||
{ | ||
/** | ||
* A list of the exception types that are not reported. | ||
* | ||
* @var array<int, class-string<Throwable>> | ||
*/ | ||
protected $dontReport = [ | ||
// | ||
]; | ||
|
||
/** | ||
* A list of the inputs that are never flashed for validation exceptions. | ||
* | ||
* @var array<int, string> | ||
*/ | ||
protected $dontFlash = [ | ||
'current_password', | ||
'password', | ||
'password_confirmation', | ||
]; | ||
|
||
/** | ||
* Register the exception handling callbacks for the application. | ||
* | ||
* @return void | ||
*/ | ||
public function register() | ||
{ | ||
$this->reportable(function (Throwable $e) { | ||
// | ||
}); | ||
} | ||
} |
Oops, something went wrong.