<?php
namespace App\Providers;
use App\Models\Modules\Menu;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
{
$this->app->singleton('Menu', function ($app) {
return new Menu();
});
}
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
view()->composer('modules.menu.horizontal', function($view) {
$view->with(['menu' => Menu::getMenuHorizontal()]);
});
view()->composer('modules.menu.vertical', function($view) {
$view->with(['menu' => Menu::getMenuVertical()]);
});
view()->composer('modules.menu.footer', function($view) {
$view->with(['menu' => Menu::getMenuFooter()]);
});
}
}
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use App\Models\Modules\Menu;
class ComposerServiceProvider extends ServiceProvider
{
public function boot()
{
view()->composer('modules.menu.horizontal', function($view) {
$view->with(['menu' => Menu::getMenuHorizontal()]);
});
view()->composer('modules.menu.vertical', function($view) {
$view->with(['menu' => Menu::getMenuVertical()]);
});
view()->composer('modules.menu.footer', function($view) {
$view->with(['menu' => Menu::getMenuFooter()]);
});
}
}
<header class="blog-header py-3">
<div class="row flex-nowrap justify-content-between align-items-center">
<div class="col-4 pt-1">
<div class="input-group col-md-4">
<input class="form-control py-2" type="search" value="search" id="example-search-input">
<span class="input-group-append">
<button class="btn btn-outline-secondary" type="button">
<i class="fa fa-search"></i>
</button>
</span>
</div>
</div>
<div class="col-4 text-center">
<a class="blog-header-logo text-dark" href="#">Large</a>
</div>
<div class="col-4 d-flex justify-content-end align-items-center">
<a class="text-muted" href="#">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="mx-3"><circle cx="10.5" cy="10.5" r="7.5"></circle><line x1="21" y1="21" x2="15.8" y2="15.8"></line></svg>
</a>
<a class="btn btn-sm btn-outline-secondary" href="#">Sign up</a>
</div>
</div>
</header>
require_once "simple_html_dom.php";
error_reporting(E_ALL);
ini_set('display_errors', '1');
$conn = oci_connect('ddd', 'ddd', '127.0.0.1/orcl', 'AL32UTF8');
$brands = array();
$html = str_get_html(file_get_contents('https://kolesa.kz/cars/'));
$i = 'INSERT ALL';
$select = $html->find('select[id=auto-car-mm-0]', 0);
foreach($select->find('option') as $opt)
{
if($opt->value == '') continue;
$i .= ' INTO kolesa_brands (id, name) VALUES('.$opt->value.', \''.$opt->plaintext.'\')';
$brands[$opt->value] = $opt->plaintext;
}
$insert = oci_parse($conn, $i.' SELECT * FROM dual;');
oci_execute($insert);