Sami
02/01/2022, 2:22 PMSami
02/01/2022, 2:23 PMifox
02/01/2022, 2:23 PMifox
02/01/2022, 2:25 PMSami
02/01/2022, 2:27 PMSami
02/01/2022, 2:28 PMuser
02/01/2022, 2:29 PMifox
02/01/2022, 2:31 PMuser
02/01/2022, 2:33 PMifox
02/01/2022, 3:36 PM`Sebastlan
02/03/2022, 1:00 AM`Sebastlan
02/03/2022, 1:07 AMifox
02/03/2022, 1:07 AMifox
02/03/2022, 1:09 AMapp(\A17\Twill\Repositories\SettingRepository::class)->byKey('phone') but that will be cleaner in a PHP class like a view composer.ifox
02/03/2022, 1:10 AM`Sebastlan
02/03/2022, 1:30 AM<?php
namespace App\View\Composers;
use A17\Twill\Models\Setting;
use Illuminate\View\View;
class SettingsComposer
{
protected $settings = [];
public function __construct()
{
foreach (Setting::all() as $setting) {
$this->settings[$setting->key] = $setting->value;
}
$footer_email = $setting->email;
}
public function compose(View $view)
{
$view->with('settings', $this->settings);
}
}
something like that?ifox
02/03/2022, 1:32 AM`Sebastlan
02/03/2022, 1:37 AMifox
02/03/2022, 1:37 AM`Sebastlan
02/03/2022, 1:37 AMifox
02/03/2022, 1:38 AMfooter_email = $setting->email; did you remove this line?ifox
02/03/2022, 1:39 AMifox
02/03/2022, 1:39 AMifox
02/03/2022, 1:40 AM@dd($settings) in a view?`Sebastlan
02/03/2022, 1:45 AMifox
02/03/2022, 1:46 AM`Sebastlan
02/03/2022, 1:53 AMwicky
02/03/2022, 1:46 PMifox
02/03/2022, 1:58 PMDepka
02/03/2022, 5:34 PM