Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
arduinomaster22 committed Jun 3, 2024
1 parent 8a7066a commit 9468664
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/CachesValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,10 @@ public function addMarkers($value): mixed
return $this->getMarker() . $value . $this->getMarker(close: true);
}


public function getRefreshRoute()
{
return route('permanent-cache.update', ['parameter' => 'test']);
$class = (new ReflectionClass($this))->name;;
return route('permanent-cache.update', encrypt([$class]));
}
}
10 changes: 8 additions & 2 deletions src/Routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

use Illuminate\Support\Facades\Route;

Route::get('/permanent-cache/update/{parameter}', function ($parameter) {
return $parameter;
Route::get('/permanent-cache/update/', function () {
$vars = decrypt(array_key_first(request()->all()));
extract($vars);
[$class] = $vars;
$class = new \ReflectionClass($class);
$staticClass = $class->getName();

return response($staticClass::updateAndGet(), 200, []);
})->name('permanent-cache.update');

0 comments on commit 9468664

Please sign in to comment.