@extends('layouts.backend') @php $marcas = []; foreach($marca as $val){ if($val->valor != ''){ $marcas[$val->valor] = $val->valor; } } $marcas = json_encode($marcas); $data_clientes = []; foreach($clientes as $val){ if($val->valor != ''){ $data_clientes[$val->valor] = $val->valor; } } $data_clientes = json_encode($data_clientes); $yearAct = date("Y"); $yearAnt = date("Y") - 1; $semanasComp = []; foreach ($semanas as $value) { $_year = substr($value->periodo, 0, 4); if($_year >= $yearAnt) { $semanasComp []= $value; } } @endphp @section('css_after') @endsection @section('content')