FleetCart/app/Exceptions/InvalidLicenseException.php
2023-06-11 13:14:03 +01:00

25 lines
462 B
PHP

<?php
namespace FleetCart\Exceptions;
use Exception;
use FleetCart\License;
class InvalidLicenseException extends Exception
{
protected $message;
public function __construct($message)
{
$this->message = $message;
resolve(License::class)->deleteLicenseFile();
}
public function render()
{
return redirect()->route('license.create')
->with('error', $this->message);
}
}