Add (routes): All routes possible
Add (pages): home country page
This commit is contained in:
15
app/View/Composers/CategoryComposer.php
Normal file
15
app/View/Composers/CategoryComposer.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\View\Composers;
|
||||
|
||||
use App\Models\Category;
|
||||
|
||||
use Illuminate\View\View;
|
||||
|
||||
class CategoryComposer
|
||||
{
|
||||
public function compose(View $view)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
31
app/View/Composers/CountryLocaleComposer.php
Normal file
31
app/View/Composers/CountryLocaleComposer.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\View\Composers;
|
||||
|
||||
use App\Models\CountryLocale;
|
||||
|
||||
use Illuminate\View\View;
|
||||
|
||||
class CountryLocaleComposer
|
||||
{
|
||||
public function compose(View $view)
|
||||
{
|
||||
$country_locales = CountryLocale::all();
|
||||
|
||||
$current_country_locale = null;
|
||||
|
||||
if (!is_null(request()->session()->get('view_country_locale')))
|
||||
{
|
||||
$current_country_locale = request()->session()->get('view_country_locale');
|
||||
}
|
||||
else
|
||||
{
|
||||
$current_country_locale = CountryLocale::where('slug', config('platform.general.fallback_country_slug'));
|
||||
}
|
||||
|
||||
|
||||
$view->with('country_locales', $country_locales)
|
||||
->with('current_country_locale', $current_country_locale);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user