Separated laravel app to its own folder (#540)

This commit is contained in:
Julien Nahum
2024-08-26 18:24:56 +02:00
committed by GitHub
parent 39b8df5eed
commit 5bd1dda504
546 changed files with 124 additions and 143 deletions

View File

@@ -0,0 +1,26 @@
<?php
namespace App\Exceptions\Workspaces;
use App\Models\Workspace;
use Exception;
class WorkspaceAlreadyExisting extends Exception
{
public function __construct(public Workspace $workspace)
{
}
public function getErrorMessage()
{
$owner = $this->workspace->users()->first();
if (! $owner) {
return 'A user already connected that workspace to another NotionForms account. You or the current workspace
owner must have a NotionForms Enterprise subscription for you to add this Notion workspace. Please upgrade
with an Enterprise subscription, or contact us to get help.';
}
return '"'.$owner->name.'" already connected that workspace to his NotionForms account. In order to collaborate,
one of you must have a NotionForms Enterprise subscription. Please upgrade or contact us to get help.';
}
}

View File

@@ -0,0 +1,10 @@
<?php
namespace App\Exceptions\Workspaces;
use Exception;
class WorkspaceLimit extends Exception
{
//
}