FleetCart/app/Exceptions/InvalidLicenseException.php

25 lines
462 B
PHP
Raw Permalink Normal View History

2023-06-11 12:14:03 +00:00
<?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);
}
}