mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 22:46:16 +00:00
cleanup before release (#391)
This commit is contained in:
@ -1,34 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Helpers;
|
||||
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class HtmxResponse extends Response
|
||||
{
|
||||
public function redirect(string $redirect): self
|
||||
{
|
||||
$this->header('HX-Redirect', $redirect);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function back(): self
|
||||
{
|
||||
return $this->redirect(back()->getTargetUrl());
|
||||
}
|
||||
|
||||
public function refresh(): self
|
||||
{
|
||||
$this->header('HX-Refresh', true);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function location(string $location): self
|
||||
{
|
||||
$this->header('HX-Location', $location);
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user