From a9d3043dcad4af8bd92fa8de0b67a05c3cb7efc0 Mon Sep 17 00:00:00 2001 From: Shift Date: Wed, 6 Jul 2022 20:20:41 +0000 Subject: [PATCH 1/2] Apply Laravel coding style Shift automatically applies the Laravel coding style - which uses the PSR-2 coding style as a base with some minor additions. You may customize the code style applied by adding a [PHP CS Fixer][1] or [PHP CodeSniffer][2] ruleset to your project root. Feel free to use [Shift's Laravel ruleset][3] to help you get started. For more information on customizing the code style applied by Shift, [watch this short video][4]. [1]: https://github.com/FriendsOfPHP/PHP-CS-Fixer [2]: https://github.com/squizlabs/PHP_CodeSniffer [3]: https://gist.github.com/laravel-shift/cab527923ed2a109dda047b97d53c200 [4]: https://laravelshift.com/videos/shift-code-style --- app/Http/Controllers/EventController.php | 51 +++------ .../Controllers/OrganiserEventsController.php | 12 +- app/Models/Ticket.php | 49 ++++---- resources/lang/en/basic.php | 108 +++++++++--------- routes/web.php | 15 ++- .../Console/Commands/CreateDatabaseTest.php | 4 +- .../Feature/Console/Commands/InstallTest.php | 4 +- tests/TestCase.php | 2 +- 8 files changed, 115 insertions(+), 130 deletions(-) diff --git a/app/Http/Controllers/EventController.php b/app/Http/Controllers/EventController.php index ab2df42da..b461a2485 100644 --- a/app/Http/Controllers/EventController.php +++ b/app/Http/Controllers/EventController.php @@ -385,28 +385,23 @@ public function CreateCloneEvent($event_id = '') /* Set values for the new Event */ $cloned_event->is_live = 0; $cloned_event->id = null; - $cloned_event->title = $event->title . '(New)'; + $cloned_event->title = $event->title.'(New)'; $cloned_event->start_date = $fechaini; $cloned_event->end_date = $fechafin; $cloned_event->exists = false; //very important so IsDirty returns correctly - - try - { + try { $cloned_event->save(); - } - catch(\Exception $e) - { + } catch (\Exception $e) { Log::error($e); - return response()->json(['status' => $e, 'messages' => trans("Controllers.event_create_exception") , ]); + + return response()->json(['status' => $e, 'messages' => trans('Controllers.event_create_exception')]); } // now get images and duplicate them (thanks for a better code from @emergingdzns ) $images = EventImage::where('event_id', $event->id)->get(); - if (count($images) > 0) - { - foreach ($images as $image) - { + if (count($images) > 0) { + foreach ($images as $image) { $newImage = new EventImage(); $newImage->image_path = $image->image_path; $newImage->created_at = date('Y-m-d H:i:s'); @@ -420,10 +415,8 @@ public function CreateCloneEvent($event_id = '') // now get survey question for the event and associate them $eventquestions = $event->questions()->get(); - if (count($eventquestions) > 0) - { - foreach ($eventquestions as $question) - { + if (count($eventquestions) > 0) { + foreach ($eventquestions as $question) { $cloned_event->questions() ->attach($question->id); } @@ -431,12 +424,8 @@ public function CreateCloneEvent($event_id = '') // now get tickets for the event and duplicate them $tickets = Ticket::where('event_id', $event->id)->get(); - if (count($tickets) > 0) - { - - foreach ($tickets as $ticket) - { - + if (count($tickets) > 0) { + foreach ($tickets as $ticket) { $ticketa = $ticket->toArray(); unset($ticketa['id']); $ticketa['event_id'] = $cloned_event->id; @@ -448,36 +437,34 @@ public function CreateCloneEvent($event_id = '') $newTicket->fill($ticketa); $newTicket->save(); - if (count($eventquestions) > 0) - { - foreach ($eventquestions as $question) - { - if (in_array($ticket->id, $question->tickets->pluck('id')->toArray())) - { + if (count($eventquestions) > 0) { + foreach ($eventquestions as $question) { + if (in_array($ticket->id, $question->tickets->pluck('id')->toArray())) { $question->tickets()->sync($newTicket->id); } } } - } - } /* redirect to wherever you want */ - return redirect(route('showOrganiserEvents', array('organiser_id' => $cloned_event->organiser_id))); - + return redirect(route('showOrganiserEvents', ['organiser_id' => $cloned_event->organiser_id])); } + public function archiveEvent($event_id = '') { $event = Event::scope()->findOrFail($event_id); $event->delete(); + return redirect()->route('showOrganiserEvents', $event->organiser->id); } + public function restoreEvent($event_id = '') { $event = Event::withTrashed()->scope() ->findOrFail($event_id); $event->deleted_at = null; $event->save(); + return redirect()->route('showOrganiserEvents', $event->organiser->id); } } diff --git a/app/Http/Controllers/OrganiserEventsController.php b/app/Http/Controllers/OrganiserEventsController.php index ab8879c24..908e5599a 100644 --- a/app/Http/Controllers/OrganiserEventsController.php +++ b/app/Http/Controllers/OrganiserEventsController.php @@ -24,18 +24,18 @@ public function showEvents(Request $request, $organiser_id) $searchQuery = $request->get('q'); $sort_by = (in_array($request->get('sort_by'), $allowed_sorts) ? $request->get('sort_by') : 'start_date'); -if ($request->has('archived')) { - $events = $searchQuery - ? Event::withTrashed()->scope()->with(['organiser', 'currency'])->where('title', 'like', '%' . $searchQuery . '%')->orderBy($sort_by, + if ($request->has('archived')) { + $events = $searchQuery + ? Event::withTrashed()->scope()->with(['organiser', 'currency'])->where('title', 'like', '%'.$searchQuery.'%')->orderBy($sort_by, 'desc')->where('organiser_id', '=', $organiser_id)->paginate(12) : Event::withTrashed()->scope()->with(['organiser', 'currency'])->where('organiser_id', '=', $organiser_id)->orderBy($sort_by, 'desc')->paginate(12); } else { $events = $searchQuery - ? Event::scope()->with(['organiser', 'currency'])->where('title', 'like', '%' . $searchQuery . '%')->orderBy($sort_by, + ? Event::scope()->with(['organiser', 'currency'])->where('title', 'like', '%'.$searchQuery.'%')->orderBy($sort_by, 'desc')->where('organiser_id', '=', $organiser_id)->paginate(12) : Event::scope()->with(['organiser', 'currency'])->where('organiser_id', '=', $organiser_id)->orderBy($sort_by, 'desc')->paginate(12); } - + $data = [ 'events' => $events, 'organiser' => $organiser, @@ -43,7 +43,7 @@ public function showEvents(Request $request, $organiser_id) 'q' => $searchQuery ? $searchQuery : '', 'sort_by' => $request->get('sort_by') ? $request->get('sort_by') : '', 'showPast' => $request->get('past'), - 'archived' => $request->get('archived'), + 'archived' => $request->get('archived'), ], ]; diff --git a/app/Models/Ticket.php b/app/Models/Ticket.php index f5cc850e7..220645dc4 100644 --- a/app/Models/Ticket.php +++ b/app/Models/Ticket.php @@ -23,33 +23,32 @@ class Ticket extends MyBaseModel protected $quantity_reserved_cache = null; /** - * @var array $fillable + * @var array */ protected $fillable = [ - 'created_at', - 'created_at', - 'updated_at', - 'deleted_at', - 'edited_by_user_id', - 'account_id', - 'order_id', - 'event_id', - 'title', - 'description', - 'price', - 'max_per_person', - 'min_per_person', - 'quantity_available', - 'quantity_sold', - 'sales_volume', - 'organiser_fees_volume', - 'is_paused', - 'public_id', - 'user_id', - 'sort_order', - 'is_hidden' - ]; - + 'created_at', + 'created_at', + 'updated_at', + 'deleted_at', + 'edited_by_user_id', + 'account_id', + 'order_id', + 'event_id', + 'title', + 'description', + 'price', + 'max_per_person', + 'min_per_person', + 'quantity_available', + 'quantity_sold', + 'sales_volume', + 'organiser_fees_volume', + 'is_paused', + 'public_id', + 'user_id', + 'sort_order', + 'is_hidden', + ]; /** * The rules to validate the model. diff --git a/resources/lang/en/basic.php b/resources/lang/en/basic.php index 0df4021d6..f65198155 100644 --- a/resources/lang/en/basic.php +++ b/resources/lang/en/basic.php @@ -4,60 +4,60 @@ *************************************************************************/ return [ - //==================================== Translations ====================================// - 'apply' => 'Apply', - 'action' => 'Action', - 'affiliates' => 'Affiliates', - 'archive' => 'Archive', - 'attendees' => 'Attendees', - 'back_to_login' => 'Back to login', - 'back_to_page' => 'Back To :page', - 'back_to_orders' => 'Back to orders', - 'cancel' => 'Cancel', - 'customize' => 'Customize', - 'dashboard' => 'Dashboard', - 'days' => 'days', - 'disable' => 'Disable', - 'disabled' => 'Disabled', - 'drag_to_reorder' => 'Drag to re-order', - 'duplicate' => 'Duplicate', - 'edit' => 'Edit', - 'enable' => 'Enable', - 'enabled' => 'Enabled', - 'error_404' => 'Looks like the page you are looking for no longer exists or has moved.', - 'event_dashboard' => 'Event Dashboard', - 'event_menu' => 'Event Menu', - 'event_page_design' => 'Event Page Design', - 'export' => 'Export', - 'general' => 'General', - 'hello' => 'Hello', - 'hours' => 'hours', - 'main_menu' => 'Main Menu', - 'manage' => 'Manage', - 'message' => 'Message', - 'minutes' => 'minutes', - 'months_short' => '|Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec|', - 'no' => 'No', - 'order_form' => 'Order Form', - 'orders' => 'Orders', - 'promote' => 'Promote', - 'restore' => 'Restore', - 'save_changes' => 'Save Changes', - 'save_details' => 'Save Details', - 'service_fees' => 'Service Fees', - 'social' => 'Social', - 'submit' => 'Submit', - 'success' => 'Success', - 'ticket_design' => 'Ticket Design', - 'access_codes' => 'Access Codes', - 'thank_you' => 'Thank you', - 'tickets' => 'Tickets', - 'TOP' => 'TOP', - 'total' => 'total', - 'whoops' => 'Whoops!', - 'yes' => 'Yes', - 'no' => 'No', - /* + //==================================== Translations ====================================// + 'apply' => 'Apply', + 'action' => 'Action', + 'affiliates' => 'Affiliates', + 'archive' => 'Archive', + 'attendees' => 'Attendees', + 'back_to_login' => 'Back to login', + 'back_to_page' => 'Back To :page', + 'back_to_orders' => 'Back to orders', + 'cancel' => 'Cancel', + 'customize' => 'Customize', + 'dashboard' => 'Dashboard', + 'days' => 'days', + 'disable' => 'Disable', + 'disabled' => 'Disabled', + 'drag_to_reorder' => 'Drag to re-order', + 'duplicate' => 'Duplicate', + 'edit' => 'Edit', + 'enable' => 'Enable', + 'enabled' => 'Enabled', + 'error_404' => 'Looks like the page you are looking for no longer exists or has moved.', + 'event_dashboard' => 'Event Dashboard', + 'event_menu' => 'Event Menu', + 'event_page_design' => 'Event Page Design', + 'export' => 'Export', + 'general' => 'General', + 'hello' => 'Hello', + 'hours' => 'hours', + 'main_menu' => 'Main Menu', + 'manage' => 'Manage', + 'message' => 'Message', + 'minutes' => 'minutes', + 'months_short' => '|Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec|', + 'no' => 'No', + 'order_form' => 'Order Form', + 'orders' => 'Orders', + 'promote' => 'Promote', + 'restore' => 'Restore', + 'save_changes' => 'Save Changes', + 'save_details' => 'Save Details', + 'service_fees' => 'Service Fees', + 'social' => 'Social', + 'submit' => 'Submit', + 'success' => 'Success', + 'ticket_design' => 'Ticket Design', + 'access_codes' => 'Access Codes', + 'thank_you' => 'Thank you', + 'tickets' => 'Tickets', + 'TOP' => 'TOP', + 'total' => 'total', + 'whoops' => 'Whoops!', + 'yes' => 'Yes', + 'no' => 'No', + /* * Lines below will turn obsolete in localization helper, it is declared in app/Helpers/macros. * If you run it, it will break file input fields. */ diff --git a/routes/web.php b/routes/web.php index cab5a45a1..00173af8a 100644 --- a/routes/web.php +++ b/routes/web.php @@ -289,21 +289,20 @@ [EventController::class, 'postCreateEvent'] )->name('postCreateEvent'); - Route::get('{event_id}/archive', [ + Route::get('{event_id}/archive', [ 'as' => 'archiveEvent', 'uses' => 'EventController@archiveEvent', ]); Route::get('{event_id}/restore', [ - 'as' => 'restoreEvent', - 'uses' => 'EventController@restoreEvent', + 'as' => 'restoreEvent', + 'uses' => 'EventController@restoreEvent', ]); - Route::get('{event_id}/duplicate', [ - 'as' => 'duplicateEvent', - 'uses' => 'EventController@CreateCloneEvent', - ]); - + Route::get('{event_id}/duplicate', [ + 'as' => 'duplicateEvent', + 'uses' => 'EventController@CreateCloneEvent', + ]); }); /* diff --git a/tests/Feature/Console/Commands/CreateDatabaseTest.php b/tests/Feature/Console/Commands/CreateDatabaseTest.php index 081fdaa03..d21872ae6 100644 --- a/tests/Feature/Console/Commands/CreateDatabaseTest.php +++ b/tests/Feature/Console/Commands/CreateDatabaseTest.php @@ -2,9 +2,9 @@ namespace Tests\Feature\Console\Commands; -use Tests\TestCase; -use Illuminate\Foundation\Testing\WithFaker; use Illuminate\Foundation\Testing\RefreshDatabase; +use Illuminate\Foundation\Testing\WithFaker; +use Tests\TestCase; /** * @see \App\Console\Commands\CreateDatabase diff --git a/tests/Feature/Console/Commands/InstallTest.php b/tests/Feature/Console/Commands/InstallTest.php index 6096379ed..654360e76 100644 --- a/tests/Feature/Console/Commands/InstallTest.php +++ b/tests/Feature/Console/Commands/InstallTest.php @@ -2,9 +2,9 @@ namespace Tests\Feature\Console\Commands; -use Tests\TestCase; -use Illuminate\Foundation\Testing\WithFaker; use Illuminate\Foundation\Testing\RefreshDatabase; +use Illuminate\Foundation\Testing\WithFaker; +use Tests\TestCase; /** * @see \App\Console\Commands\Install diff --git a/tests/TestCase.php b/tests/TestCase.php index 8fa64c5fc..a3915fc81 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -2,8 +2,8 @@ namespace Tests; -use JMac\Testing\Traits\AdditionalAssertions; use Illuminate\Foundation\Testing\TestCase as BaseTestCase; +use JMac\Testing\Traits\AdditionalAssertions; use Tests\Concerns\DatabaseSetup; abstract class TestCase extends BaseTestCase From 54e6311b9c3eb75cc830bfa92de09160126726b6 Mon Sep 17 00:00:00 2001 From: Shift Date: Wed, 6 Jul 2022 20:20:42 +0000 Subject: [PATCH 2/2] Condense Attendize into default Laravel namespace --- app/{Models => }/Account.php | 2 +- app/{Models => }/AccountPaymentGateway.php | 0 app/{Models => }/Activity.php | 0 app/{Models => }/Affiliate.php | 0 app/{Models => }/Attendee.php | 0 app/{Models => }/Country.php | 0 app/{Models => }/Currency.php | 0 app/{Models => }/DateFormat.php | 0 app/{Models => }/DateTimeFormat.php | 0 app/{Models => }/DiscountCode.php | 0 app/{Models => }/Event.php | 0 app/{Models => }/EventAccessCodes.php | 0 app/{Models => }/EventImage.php | 0 app/{Models => }/EventStats.php | 0 app/Http/Controllers/EventCheckoutController.php | 2 +- app/Http/Controllers/EventViewController.php | 2 +- app/Http/Controllers/OrganiserViewController.php | 2 +- app/Http/Controllers/UserSignupController.php | 2 +- app/Http/Middleware/CheckInstalled.php | 2 +- app/Http/Middleware/SetViewVariables.php | 2 +- app/{Models => }/Message.php | 0 app/{Models => }/MyBaseModel.php | 0 app/{Models => }/Order.php | 0 app/{Models => }/OrderItem.php | 0 app/{Models => }/OrderStatus.php | 0 app/{Models => }/Organiser.php | 0 app/{Models => }/PaymentGateway.php | 0 app/Providers/HelpersServiceProvider.php | 2 +- app/{Models => }/Question.php | 0 app/{Models => }/QuestionAnswer.php | 0 app/{Models => }/QuestionOption.php | 0 app/{Models => }/QuestionType.php | 0 app/{Models => }/ReservedTickets.php | 0 app/{Models => }/Ticket.php | 2 +- app/{Models => }/TicketStatus.php | 0 app/{Models => }/Timezone.php | 0 app/{Models => }/User.php | 0 composer.json | 1 - config/app.php | 2 +- tests/Feature/Utils/UtilsTest.php | 2 +- tests/deprecated/UserLoginTest.php | 2 +- tests/deprecated/UserSignUpTest.php | 2 +- tests/deprecated/UserTest.php | 2 +- 43 files changed, 14 insertions(+), 15 deletions(-) rename app/{Models => }/Account.php (99%) rename app/{Models => }/AccountPaymentGateway.php (100%) rename app/{Models => }/Activity.php (100%) rename app/{Models => }/Affiliate.php (100%) rename app/{Models => }/Attendee.php (100%) rename app/{Models => }/Country.php (100%) rename app/{Models => }/Currency.php (100%) rename app/{Models => }/DateFormat.php (100%) rename app/{Models => }/DateTimeFormat.php (100%) rename app/{Models => }/DiscountCode.php (100%) rename app/{Models => }/Event.php (100%) rename app/{Models => }/EventAccessCodes.php (100%) rename app/{Models => }/EventImage.php (100%) rename app/{Models => }/EventStats.php (100%) rename app/{Models => }/Message.php (100%) rename app/{Models => }/MyBaseModel.php (100%) rename app/{Models => }/Order.php (100%) rename app/{Models => }/OrderItem.php (100%) rename app/{Models => }/OrderStatus.php (100%) rename app/{Models => }/Organiser.php (100%) rename app/{Models => }/PaymentGateway.php (100%) rename app/{Models => }/Question.php (100%) rename app/{Models => }/QuestionAnswer.php (100%) rename app/{Models => }/QuestionOption.php (100%) rename app/{Models => }/QuestionType.php (100%) rename app/{Models => }/ReservedTickets.php (100%) rename app/{Models => }/Ticket.php (99%) rename app/{Models => }/TicketStatus.php (100%) rename app/{Models => }/Timezone.php (100%) rename app/{Models => }/User.php (100%) diff --git a/app/Models/Account.php b/app/Account.php similarity index 99% rename from app/Models/Account.php rename to app/Account.php index b85822647..6e18ff2af 100644 --- a/app/Models/Account.php +++ b/app/Account.php @@ -2,7 +2,7 @@ namespace App\Models; -use App\Attendize\Utils; +use App\App\Utils; use DB; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\SoftDeletes; diff --git a/app/Models/AccountPaymentGateway.php b/app/AccountPaymentGateway.php similarity index 100% rename from app/Models/AccountPaymentGateway.php rename to app/AccountPaymentGateway.php diff --git a/app/Models/Activity.php b/app/Activity.php similarity index 100% rename from app/Models/Activity.php rename to app/Activity.php diff --git a/app/Models/Affiliate.php b/app/Affiliate.php similarity index 100% rename from app/Models/Affiliate.php rename to app/Affiliate.php diff --git a/app/Models/Attendee.php b/app/Attendee.php similarity index 100% rename from app/Models/Attendee.php rename to app/Attendee.php diff --git a/app/Models/Country.php b/app/Country.php similarity index 100% rename from app/Models/Country.php rename to app/Country.php diff --git a/app/Models/Currency.php b/app/Currency.php similarity index 100% rename from app/Models/Currency.php rename to app/Currency.php diff --git a/app/Models/DateFormat.php b/app/DateFormat.php similarity index 100% rename from app/Models/DateFormat.php rename to app/DateFormat.php diff --git a/app/Models/DateTimeFormat.php b/app/DateTimeFormat.php similarity index 100% rename from app/Models/DateTimeFormat.php rename to app/DateTimeFormat.php diff --git a/app/Models/DiscountCode.php b/app/DiscountCode.php similarity index 100% rename from app/Models/DiscountCode.php rename to app/DiscountCode.php diff --git a/app/Models/Event.php b/app/Event.php similarity index 100% rename from app/Models/Event.php rename to app/Event.php diff --git a/app/Models/EventAccessCodes.php b/app/EventAccessCodes.php similarity index 100% rename from app/Models/EventAccessCodes.php rename to app/EventAccessCodes.php diff --git a/app/Models/EventImage.php b/app/EventImage.php similarity index 100% rename from app/Models/EventImage.php rename to app/EventImage.php diff --git a/app/Models/EventStats.php b/app/EventStats.php similarity index 100% rename from app/Models/EventStats.php rename to app/EventStats.php diff --git a/app/Http/Controllers/EventCheckoutController.php b/app/Http/Controllers/EventCheckoutController.php index 3c58b85a5..b4150739b 100644 --- a/app/Http/Controllers/EventCheckoutController.php +++ b/app/Http/Controllers/EventCheckoutController.php @@ -2,7 +2,7 @@ namespace App\Http\Controllers; -use App\Attendize\PaymentUtils; +use App\App\PaymentUtils; use App\Jobs\SendOrderAttendeeTicketJob; use App\Jobs\SendOrderConfirmationJob; use App\Jobs\SendOrderNotificationJob; diff --git a/app/Http/Controllers/EventViewController.php b/app/Http/Controllers/EventViewController.php index ee69034f3..1e5390ae2 100644 --- a/app/Http/Controllers/EventViewController.php +++ b/app/Http/Controllers/EventViewController.php @@ -2,7 +2,7 @@ namespace App\Http\Controllers; -use App\Attendize\Utils; +use App\App\Utils; use App\Models\Affiliate; use App\Models\Event; use App\Models\EventAccessCodes; diff --git a/app/Http/Controllers/OrganiserViewController.php b/app/Http/Controllers/OrganiserViewController.php index 78223dece..679b1ad15 100644 --- a/app/Http/Controllers/OrganiserViewController.php +++ b/app/Http/Controllers/OrganiserViewController.php @@ -2,7 +2,7 @@ namespace App\Http\Controllers; -use App\Attendize\Utils; +use App\App\Utils; use App\Models\Organiser; use Auth; use Illuminate\Contracts\View\View; diff --git a/app/Http/Controllers/UserSignupController.php b/app/Http/Controllers/UserSignupController.php index 9d95931de..2156b87ac 100644 --- a/app/Http/Controllers/UserSignupController.php +++ b/app/Http/Controllers/UserSignupController.php @@ -2,7 +2,7 @@ namespace App\Http\Controllers; -use App\Attendize\Utils; +use App\App\Utils; use App\Models\Account; use App\Models\User; use Hash; diff --git a/app/Http/Middleware/CheckInstalled.php b/app/Http/Middleware/CheckInstalled.php index 56a0fcae4..33753fa99 100644 --- a/app/Http/Middleware/CheckInstalled.php +++ b/app/Http/Middleware/CheckInstalled.php @@ -2,7 +2,7 @@ namespace App\Http\Middleware; -use App\Attendize\Utils; +use App\App\Utils; use App\Models\Account; use Closure; use Illuminate\Http\Request; diff --git a/app/Http/Middleware/SetViewVariables.php b/app/Http/Middleware/SetViewVariables.php index d62923ae1..c0ba2df29 100644 --- a/app/Http/Middleware/SetViewVariables.php +++ b/app/Http/Middleware/SetViewVariables.php @@ -2,7 +2,7 @@ namespace App\Http\Middleware; -use App\Attendize\Utils; +use App\App\Utils; use App\Models\Organiser; use Closure; use Illuminate\Support\Facades\Auth; diff --git a/app/Models/Message.php b/app/Message.php similarity index 100% rename from app/Models/Message.php rename to app/Message.php diff --git a/app/Models/MyBaseModel.php b/app/MyBaseModel.php similarity index 100% rename from app/Models/MyBaseModel.php rename to app/MyBaseModel.php diff --git a/app/Models/Order.php b/app/Order.php similarity index 100% rename from app/Models/Order.php rename to app/Order.php diff --git a/app/Models/OrderItem.php b/app/OrderItem.php similarity index 100% rename from app/Models/OrderItem.php rename to app/OrderItem.php diff --git a/app/Models/OrderStatus.php b/app/OrderStatus.php similarity index 100% rename from app/Models/OrderStatus.php rename to app/OrderStatus.php diff --git a/app/Models/Organiser.php b/app/Organiser.php similarity index 100% rename from app/Models/Organiser.php rename to app/Organiser.php diff --git a/app/Models/PaymentGateway.php b/app/PaymentGateway.php similarity index 100% rename from app/Models/PaymentGateway.php rename to app/PaymentGateway.php diff --git a/app/Providers/HelpersServiceProvider.php b/app/Providers/HelpersServiceProvider.php index 8d631d79b..0606739b8 100644 --- a/app/Providers/HelpersServiceProvider.php +++ b/app/Providers/HelpersServiceProvider.php @@ -2,7 +2,7 @@ namespace App\Providers; -use App\Attendize\PaymentUtils; +use App\App\PaymentUtils; use Illuminate\Support\Facades\Blade; use Illuminate\Support\ServiceProvider; diff --git a/app/Models/Question.php b/app/Question.php similarity index 100% rename from app/Models/Question.php rename to app/Question.php diff --git a/app/Models/QuestionAnswer.php b/app/QuestionAnswer.php similarity index 100% rename from app/Models/QuestionAnswer.php rename to app/QuestionAnswer.php diff --git a/app/Models/QuestionOption.php b/app/QuestionOption.php similarity index 100% rename from app/Models/QuestionOption.php rename to app/QuestionOption.php diff --git a/app/Models/QuestionType.php b/app/QuestionType.php similarity index 100% rename from app/Models/QuestionType.php rename to app/QuestionType.php diff --git a/app/Models/ReservedTickets.php b/app/ReservedTickets.php similarity index 100% rename from app/Models/ReservedTickets.php rename to app/ReservedTickets.php diff --git a/app/Models/Ticket.php b/app/Ticket.php similarity index 99% rename from app/Models/Ticket.php rename to app/Ticket.php index 220645dc4..8c9de8b97 100644 --- a/app/Models/Ticket.php +++ b/app/Ticket.php @@ -2,7 +2,7 @@ namespace App\Models; -use App\Attendize\PaymentUtils; +use App\App\PaymentUtils; use Carbon\Carbon; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Relations\BelongsToMany; diff --git a/app/Models/TicketStatus.php b/app/TicketStatus.php similarity index 100% rename from app/Models/TicketStatus.php rename to app/TicketStatus.php diff --git a/app/Models/Timezone.php b/app/Timezone.php similarity index 100% rename from app/Models/Timezone.php rename to app/Timezone.php diff --git a/app/Models/User.php b/app/User.php similarity index 100% rename from app/Models/User.php rename to app/User.php diff --git a/composer.json b/composer.json index 2266a0c9c..cc6459e1f 100644 --- a/composer.json +++ b/composer.json @@ -66,7 +66,6 @@ ], "psr-4": { "App\\": "app/", - "Attendize\\": "app/Models", "Database\\Factories\\": "database/factories/", "Database\\Seeders\\": "database/seeders/" } diff --git a/config/app.php b/config/app.php index 59114b78d..72d42d3b0 100644 --- a/config/app.php +++ b/config/app.php @@ -250,7 +250,7 @@ // Attendize Class Alias 'Markdown' => GrahamCampbell\Markdown\Facades\Markdown::class, 'PDF' => Nitmedia\Wkhtml2pdf\Facades\Wkhtml2pdf::class, - 'Utils' => App\Attendize\Utils::class, + 'Utils' => App\App\Utils::class, 'Excel' => Maatwebsite\Excel\Facades\Excel::class, ], diff --git a/tests/Feature/Utils/UtilsTest.php b/tests/Feature/Utils/UtilsTest.php index fe2111dc3..806464f54 100644 --- a/tests/Feature/Utils/UtilsTest.php +++ b/tests/Feature/Utils/UtilsTest.php @@ -2,7 +2,7 @@ namespace Tests\Features; -use App\Attendize\Utils; +use App\App\Utils; use Tests\TestCase; class UtilsTest extends TestCase diff --git a/tests/deprecated/UserLoginTest.php b/tests/deprecated/UserLoginTest.php index 95ca96033..78764a91a 100644 --- a/tests/deprecated/UserLoginTest.php +++ b/tests/deprecated/UserLoginTest.php @@ -1,6 +1,6 @@