init project

This commit is contained in:
2026-05-25 11:08:52 +07:00
parent a388c619b5
commit 895fdd9b83
1437 changed files with 384844 additions and 27 deletions

View File

@@ -0,0 +1,55 @@
<?php
namespace App\Providers;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\View;
use App\Models\Publication;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
if ($this->app->environment('local')) {
$this->app->register(\Laravel\Telescope\TelescopeServiceProvider::class);
$this->app->register(TelescopeServiceProvider::class);
}
}
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot(): void
{
// Only needed for older MySQL versions (< 5.7.7)
Schema::defaultStringLength(191);
// Language switcher composer
// View::composer('partials.language_switcher', function ($view) {
// $view->with('current_locale', app()->getLocale());
// $view->with('available_locales', config('app.available_locales'));
// });
// Shared publications message
$publications = Publication::query()
->whereRaw('CURDATE() BETWEEN start_date AND end_date')
->where('record_status_id', 1)
->orderByDesc('id')
->get();
View::share([
'sharedMessage' => $publications,
]);
}
}