Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
namespace App\Http\Controllers;
use App\Statistic;
class StatisticController extends Controller
public function stats() {
$period = request('period');
$statistics = Statistic::select('columns')
->where('Period', $period)
$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