Added services
This commit moves most controller logic onto Services. Services are part of the Service-Repository pattern. The models act as repositories. Services are easily testable and are needed for the upcoming API, in order to avoid duplicated code and to maintain a single source of "truth". The User, Vacancy and Vote controllers still need their logic moved onto services.
This commit is contained in:
11
app/Exceptions/ApplicationNotFoundException.php
Normal file
11
app/Exceptions/ApplicationNotFoundException.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||
|
||||
class ApplicationNotFoundException extends ModelNotFoundException
|
||||
{
|
||||
//
|
||||
}
|
10
app/Exceptions/EmptyFormException.php
Normal file
10
app/Exceptions/EmptyFormException.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
class EmptyFormException extends Exception
|
||||
{
|
||||
//
|
||||
}
|
10
app/Exceptions/EmptyOptionsException.php
Normal file
10
app/Exceptions/EmptyOptionsException.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
class EmptyOptionsException extends Exception
|
||||
{
|
||||
//
|
||||
}
|
10
app/Exceptions/FailedCaptchaException.php
Normal file
10
app/Exceptions/FailedCaptchaException.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
class FailedCaptchaException extends Exception
|
||||
{
|
||||
//
|
||||
}
|
10
app/Exceptions/FileUploadException.php
Normal file
10
app/Exceptions/FileUploadException.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
class FileUploadException extends Exception
|
||||
{
|
||||
//
|
||||
}
|
10
app/Exceptions/FormHasConstraintsException.php
Normal file
10
app/Exceptions/FormHasConstraintsException.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
class FormHasConstraintsException extends Exception
|
||||
{
|
||||
//
|
||||
}
|
10
app/Exceptions/IncompleteApplicationException.php
Normal file
10
app/Exceptions/IncompleteApplicationException.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
class IncompleteApplicationException extends Exception
|
||||
{
|
||||
//
|
||||
}
|
10
app/Exceptions/InvalidAppointmentException.php
Normal file
10
app/Exceptions/InvalidAppointmentException.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
class InvalidAppointmentException extends Exception
|
||||
{
|
||||
//
|
||||
}
|
10
app/Exceptions/InvalidAppointmentStatusException.php
Normal file
10
app/Exceptions/InvalidAppointmentStatusException.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
class InvalidAppointmentStatusException extends Exception
|
||||
{
|
||||
//
|
||||
}
|
10
app/Exceptions/InvalidGamePreferenceException.php
Normal file
10
app/Exceptions/InvalidGamePreferenceException.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
class InvalidGamePreferenceException extends Exception
|
||||
{
|
||||
//
|
||||
}
|
10
app/Exceptions/InvalidInviteException.php
Normal file
10
app/Exceptions/InvalidInviteException.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
class InvalidInviteException extends Exception
|
||||
{
|
||||
//
|
||||
}
|
10
app/Exceptions/OptionCategoryNotFoundException.php
Normal file
10
app/Exceptions/OptionCategoryNotFoundException.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
class OptionCategoryNotFoundException extends Exception
|
||||
{
|
||||
//
|
||||
}
|
10
app/Exceptions/OptionNotFoundException.php
Normal file
10
app/Exceptions/OptionNotFoundException.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
class OptionNotFoundException extends Exception
|
||||
{
|
||||
//
|
||||
}
|
10
app/Exceptions/ProfileNotFoundException.php
Normal file
10
app/Exceptions/ProfileNotFoundException.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
class ProfileNotFoundException extends Exception
|
||||
{
|
||||
//
|
||||
}
|
10
app/Exceptions/PublicTeamInviteException.php
Normal file
10
app/Exceptions/PublicTeamInviteException.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
class PublicTeamInviteException extends Exception
|
||||
{
|
||||
//
|
||||
}
|
10
app/Exceptions/UnavailableApplicationException.php
Normal file
10
app/Exceptions/UnavailableApplicationException.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
class UnavailableApplicationException extends Exception
|
||||
{
|
||||
//
|
||||
}
|
10
app/Exceptions/UserAlreadyInvitedException.php
Normal file
10
app/Exceptions/UserAlreadyInvitedException.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
class UserAlreadyInvitedException extends Exception
|
||||
{
|
||||
//
|
||||
}
|
11
app/Exceptions/VacancyNotFoundException.php
Normal file
11
app/Exceptions/VacancyNotFoundException.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||
|
||||
class VacancyNotFoundException extends ModelNotFoundException
|
||||
{
|
||||
//
|
||||
}
|
Reference in New Issue
Block a user