Files
citrus-cms/resources/views/admin-ajax/lang-cache.blade.php
T
2026-04-28 21:15:09 +03:00

22 lines
551 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Contents;
use Illuminate\Support\Facades\DB;
//bir dil dosyasına ait tüm içerikleri json işlemini yapar.
$p = $request->all();
$dizi = array();
$contents = Contents::get();
$k=0;
$p['dil'] = str_replace(".json","",$p['dil']);
foreach($contents AS $c) {
$k++;
file_get_contents(url("l-".$p['dil']."/".$c->slug));
}
echo "Toplam $k içeriğin {$p['dil']} içerikleri cachelendi";
$return = null;