Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
namespace App\Http\Controllers;
use App\Statistic;
class StatisticController extends Controller
{
public function stats() {
$period = request('period');
$statistics = Statistic::select('columns')
->where('Period', $period)
->orderBy('PeriodDate');
$statisticsCurrentYear = clone $statistics; // falla el resultado final
$statisticsPreviousYear = clone $statistics; // falla el resultado final
// más código aquí
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.