25 lines
462 B
PHP
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);
|
|
}
|
|
}
|