Migrate backend to Porto architecture and fix minor bugs

- Fully transitioned the backend to the Porto architectural pattern
- Improved code organization and maintainability
- Fixed minor bugs and inconsistencies
This commit is contained in:
F4ilji
2025-05-12 08:47:43 +05:00
parent 76deaf75f3
commit c01016a154
620 changed files with 16218 additions and 6073 deletions
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Broadcasting;
use Illuminate\Broadcasting\Channel as LaravelChannel;
abstract class Channel extends LaravelChannel
{
}
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Broadcasting;
use Illuminate\Broadcasting\PresenceChannel as LaravelPresenceChannel;
abstract class PresenceChannel extends LaravelPresenceChannel
{
}
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Broadcasting;
use Illuminate\Broadcasting\PrivateChannel as LaravelPrivateChannel;
abstract class PrivateChannel extends LaravelPrivateChannel
{
}
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Commands;
use Illuminate\Console\Command as LaravelCommand;
abstract class ConsoleCommand extends LaravelCommand
{
}
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Components;
use Illuminate\View\Component as LaravelComponent;
abstract class Component extends LaravelComponent
{
}
@@ -0,0 +1,13 @@
<?php
namespace App\Ship\Abstracts\Controllers;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as LaravelBaseController;
abstract class Controller extends LaravelBaseController
{
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
}
+12
View File
@@ -0,0 +1,12 @@
<?php
namespace App\Ship\Abstracts\Events;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
abstract class Event
{
use Dispatchable, InteractsWithSockets, SerializesModels;
}
+10
View File
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Exceptions;
use Illuminate\Foundation\Exceptions\Handler as LaravelExceptionHandler;
abstract class Handler extends LaravelExceptionHandler
{
}
+10
View File
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Factories;
use Illuminate\Database\Eloquent\Factories\Factory as LaravelFactory;
abstract class Factory extends LaravelFactory
{
}
+10
View File
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Jobs;
use Illuminate\Foundation\Bus\Dispatchable;
abstract class Job
{
use Dispatchable;
}
+14
View File
@@ -0,0 +1,14 @@
<?php
namespace App\Ship\Abstracts\Jobs;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
abstract class JobQueued implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
}
+12
View File
@@ -0,0 +1,12 @@
<?php
namespace App\Ship\Abstracts\Mails;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable as LaravelMailable;
use Illuminate\Queue\SerializesModels;
abstract class Mailable extends LaravelMailable
{
use Queueable, SerializesModels;
}
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Mails\Mailables;
use Illuminate\Mail\Mailables\Content as LaravelContent;
abstract class Content extends LaravelContent
{
}
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Mails\Mailables;
use Illuminate\Mail\Mailables\Envelope as LaravelEnvelope;
abstract class Envelope extends LaravelEnvelope
{
}
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Middleware;
use Illuminate\Auth\Middleware\Authenticate as LaravelMiddleware;
abstract class Authenticate extends LaravelMiddleware
{
}
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Middleware;
use Illuminate\Cookie\Middleware\EncryptCookies as LaravelMiddleware;
abstract class EncryptCookies extends LaravelMiddleware
{
}
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Middleware;
use Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance as LaravelMiddleware;
abstract class PreventRequestsDuringMaintenance extends LaravelMiddleware
{
}
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Middleware;
use Illuminate\Foundation\Http\Middleware\TrimStrings as LaravelMiddleware;
abstract class TrimStrings extends LaravelMiddleware
{
}
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Middleware;
use Illuminate\Http\Middleware\TrustHosts as LaravelMiddleware;
abstract class TrustHosts extends LaravelMiddleware
{
}
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Middleware;
use Illuminate\Http\Middleware\TrustProxies as LaravelMiddleware;
abstract class TrustProxies extends LaravelMiddleware
{
}
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Middleware;
use Illuminate\Routing\Middleware\ValidateSignature as LaravelMiddleware;
abstract class ValidateSignature extends LaravelMiddleware
{
}
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Middleware;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as LaravelMiddleware;
abstract class VerifyCsrfToken extends LaravelMiddleware
{
}
+10
View File
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Models;
use Illuminate\Database\Eloquent\Model as LaravelModel;
abstract class BaseModel extends LaravelModel
{
}
+10
View File
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Models;
use Illuminate\Database\Eloquent\Builder as LaravelBuilder;
abstract class Builder extends LaravelBuilder
{
}
+10
View File
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Models;
use Illuminate\Database\Eloquent\Relations\MorphPivot as LaravelMorphPivot;
abstract class MorphPivot extends LaravelMorphPivot
{
}
+10
View File
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Models;
use Illuminate\Database\Eloquent\Relations\Pivot as LaravelPivot;
abstract class Pivot extends LaravelPivot
{
}
+14
View File
@@ -0,0 +1,14 @@
<?php
namespace App\Ship\Abstracts\Models;
// use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as LaravelAuthenticate;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;
abstract class UserModel extends LaravelAuthenticate
{
use HasApiTokens, HasFactory, Notifiable;
}
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Notifications\Messages;
use Illuminate\Notifications\Messages\MailMessage as LaravelMailMessage;
abstract class MailMessage extends LaravelMailMessage
{
}
@@ -0,0 +1,11 @@
<?php
namespace App\Ship\Abstracts\Notifications;
use Illuminate\Notifications\Notification as LaravelNotification;
use Illuminate\Bus\Queueable;
abstract class Notification extends LaravelNotification
{
use Queueable;
}
+10
View File
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Policies;
use Illuminate\Auth\Access\HandlesAuthorization;
abstract class Policy
{
use HandlesAuthorization;
}
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Providers;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as LaravelAuthServiceProvider;
abstract class AuthServiceProvider extends LaravelAuthServiceProvider
{
}
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Providers;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as LaravelEventServiceProvider;
abstract class EventServiceProvider extends LaravelEventServiceProvider
{
}
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Providers;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as LaravelRouteServiceProvider;
abstract class RouteServiceProvider extends LaravelRouteServiceProvider
{
}
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Providers;
use Illuminate\Support\ServiceProvider as LaravelServiceProvider;
abstract class ServiceProvider extends LaravelServiceProvider
{
}
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Requests;
use Illuminate\Foundation\Http\FormRequest as LaravelFormRequest;
abstract class FormRequest extends LaravelFormRequest
{
}
+10
View File
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Requests;
use Illuminate\Http\Request as LaravelRequest;
abstract class Request extends LaravelRequest
{
}
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Resources;
use Illuminate\Http\Resources\Json\JsonResource as LaravelJsonResource;
abstract class JsonResource extends LaravelJsonResource
{
}
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Resources;
use Illuminate\Http\Resources\Json\ResourceCollection as LaravelResourceCollection;
abstract class ResourceCollection extends LaravelResourceCollection
{
}
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Responses;
use Illuminate\Http\RedirectResponse as LaravelRedirectResponse;
abstract class RedirectResponse extends LaravelRedirectResponse
{
}
+10
View File
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Responses;
use Illuminate\Http\Response as LaravelResponse;
abstract class Response extends LaravelResponse
{
}
+10
View File
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Seeders;
use Illuminate\Database\Seeder as LaravelSeeder;
abstract class Seeder extends LaravelSeeder
{
}
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Tests\PhpUnit;
use Illuminate\Foundation\Testing\TestCase as LaravelTestCase;
abstract class TestCase extends LaravelTestCase
{
}
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Translations;
use Illuminate\Translation\PotentiallyTranslatedString as LaravelPotentiallyTranslatedString;
abstract class PotentiallyTranslatedString extends LaravelPotentiallyTranslatedString
{
}
+10
View File
@@ -0,0 +1,10 @@
<?php
namespace App\Ship\Abstracts\Views;
use Illuminate\View\Component as LaravelComponent;
abstract class Component extends LaravelComponent
{
}