Skip to content

Commit

Permalink
Namespace models under App\Models
Browse files Browse the repository at this point in the history
  • Loading branch information
laravel-shift committed Aug 8, 2024
1 parent f251d20 commit 5a70f20
Show file tree
Hide file tree
Showing 127 changed files with 228 additions and 228 deletions.
2 changes: 1 addition & 1 deletion app/Console/Commands/CheckPackageUrls.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace App\Console\Commands;

use App\Jobs\CheckPackageUrlsForAvailability as CheckPackageUrlsJob;
use App\Package;
use App\Models\Package;
use Illuminate\Console\Command;

class CheckPackageUrls extends Command
Expand Down
2 changes: 1 addition & 1 deletion app/Console/Commands/DeleteOpenGraphImages.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace App\Console\Commands;

use App\Package;
use App\Models\Package;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Storage;

Expand Down
4 changes: 2 additions & 2 deletions app/Console/Commands/DeleteSelfAuthoredPackageRatings.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function handle(): void

private function deleteSelfAuthoredPackageRatings()
{
$query = Rating::whereHasMorph('rateable', \App\Package::class, function ($query) {
$query = Rating::whereHasMorph('rateable', \App\Models\Package::class, function ($query) {
return $query
->join('collaborators', 'collaborators.id', '=', 'packages.author_id')
->whereRaw('collaborators.user_id = ratings.user_id');
Expand All @@ -32,7 +32,7 @@ private function deleteSelfAuthoredPackageRatings()

private function deleteSelfContributedPackageRatings()
{
$query = Rating::whereHasMorph('rateable', \App\Package::class, function ($query) {
$query = Rating::whereHasMorph('rateable', \App\Models\Package::class, function ($query) {
return $query
->join('collaborator_package', 'collaborator_package.package_id', '=', 'packages.id')
->join('collaborators', 'collaborators.id', '=', 'collaborator_package.collaborator_id')
Expand Down
2 changes: 1 addition & 1 deletion app/Console/Commands/DisableUnavailablePackages.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace App\Console\Commands;

use App\Notifications\NotifyAuthorOfDisabledPackage;
use App\Package;
use App\Models\Package;
use Illuminate\Console\Command;

class DisableUnavailablePackages extends Command
Expand Down
2 changes: 1 addition & 1 deletion app/Console/Commands/GenerateOpenGraphImages.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace App\Console\Commands;

use App\Jobs\GeneratePackageOpenGraphImage;
use App\Package;
use App\Models\Package;
use Illuminate\Console\Command;

class GenerateOpenGraphImages extends Command
Expand Down
2 changes: 1 addition & 1 deletion app/Console/Commands/GithubAuthNotify.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace App\Console\Commands;

use App\Notifications\GithubAuthNotification;
use App\User;
use App\Models\User;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Notification;

Expand Down
2 changes: 1 addition & 1 deletion app/Console/Commands/SendUnavailablePackageFollowUp.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace App\Console\Commands;

use App\Notifications\RemindAuthorOfUnavailablePackage;
use App\Package;
use App\Models\Package;
use Illuminate\Console\Command;

class SendUnavailablePackageFollowUp extends Command
Expand Down
2 changes: 1 addition & 1 deletion app/Console/Commands/SyncPackagistData.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace App\Console\Commands;

use App\Jobs\SyncPackagePackagistData;
use App\Package;
use App\Models\Package;
use Illuminate\Console\Command;

class SyncPackagistData extends Command
Expand Down
2 changes: 1 addition & 1 deletion app/Console/Commands/SyncRepositoryData.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace App\Console\Commands;

use App\Jobs\SyncPackageRepositoryData;
use App\Package;
use App\Models\Package;
use Illuminate\Console\Command;

class SyncRepositoryData extends Command
Expand Down
4 changes: 2 additions & 2 deletions app/Events/CollaboratorClaimed.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace App\Events;

use App\Collaborator;
use App\User;
use App\Models\Collaborator;
use App\Models\User;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
Expand Down
2 changes: 1 addition & 1 deletion app/Events/CollaboratorCreated.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace App\Events;

use App\Collaborator;
use App\Models\Collaborator;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
Expand Down
2 changes: 1 addition & 1 deletion app/Events/NewUserSignedUp.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace App\Events;

use App\User;
use App\Models\User;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
Expand Down
2 changes: 1 addition & 1 deletion app/Events/PackageCreated.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace App\Events;

use App\Package;
use App\Models\Package;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
Expand Down
2 changes: 1 addition & 1 deletion app/Events/PackageDeleted.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace App\Events;

use App\User;
use App\Models\User;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
Expand Down
2 changes: 1 addition & 1 deletion app/Events/PackageRated.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace App\Events;

use App\Package;
use App\Models\Package;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
Expand Down
2 changes: 1 addition & 1 deletion app/Events/PackageUpdated.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace App\Events;

use App\Package;
use App\Models\Package;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace App\Http\Controllers;

use Illuminate\View\View;
use App\Package;
use App\Models\Package;
use Illuminate\Http\Request;

class AdminController extends Controller
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Api/FeedController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Package;
use App\Models\Package;
use Illuminate\Support\Facades\Log;

class FeedController extends Controller
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Api/PackagesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use App\Http\Controllers\Controller;
use App\Http\Resources\Package as PackageResource;
use App\Package;
use App\Models\Package;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;

Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Api/PopularController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use App\CacheKeys;
use App\Http\Controllers\Controller;
use App\Http\Resources\Package as PackageResource;
use App\Package;
use App\Models\Package;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Log;
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Api/RecentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use App\CacheKeys;
use App\Http\Controllers\Controller;
use App\Http\Resources\Package as PackageResource;
use App\Package;
use App\Models\Package;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Log;
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Api/SearchController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use App\CacheKeys;
use App\Http\Controllers\Controller;
use App\Http\Resources\Package as PackageResource;
use App\Package;
use App\Models\Package;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Log;
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/App/CollaboratorClaimController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Illuminate\View\View;
use Illuminate\Http\RedirectResponse;
use App\Collaborator;
use App\Models\Collaborator;
use App\Events\CollaboratorClaimed;
use App\Http\Controllers\Controller;

Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/App/CollaboratorController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Illuminate\View\View;
use Illuminate\Http\RedirectResponse;
use App\Collaborator;
use App\Models\Collaborator;
use App\Events\CollaboratorCreated;
use App\Http\Controllers\Controller;
use App\Http\Remotes\GitHub;
Expand Down
6 changes: 3 additions & 3 deletions app/Http/Controllers/App/PackageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

use Illuminate\View\View;
use Illuminate\Http\RedirectResponse;
use App\Collaborator;
use App\Models\Collaborator;
use App\Events\PackageCreated;
use App\Events\PackageDeleted;
use App\Events\PackageUpdated;
use App\Http\Controllers\Controller;
use App\Http\Requests\PackageFormRequest;
use App\Package;
use App\Tag;
use App\Models\Package;
use App\Models\Tag;
use DateTime;
use Facades\App\Repo;
use Illuminate\Support\Facades\DB;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use App\CacheKeys;
use App\Http\Controllers\Controller;
use App\Package;
use App\Models\Package;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Cache;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use App\Http\Controllers\Controller;
use App\Jobs\SyncPackageRepositoryData;
use App\Package;
use App\Models\Package;
use Illuminate\Http\Request;

class RefreshPackageRepositoryController extends Controller
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/App/ScreenshotUploadController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Illuminate\Http\JsonResponse;
use App\Http\Controllers\Controller;
use App\Screenshot;
use App\Models\Screenshot;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage;

Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Auth/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Illuminate\Http\RedirectResponse;
use App\Events\NewUserSignedUp;
use App\Http\Controllers\Controller;
use App\User;
use App\Models\User;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
use Illuminate\Support\Facades\Auth;
use Laravel\Socialite\Facades\Socialite;
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/CollaboratorController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace App\Http\Controllers;

use Illuminate\View\View;
use App\Collaborator;
use App\Models\Collaborator;

class CollaboratorController extends Controller
{
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/DisablePackageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace App\Http\Controllers;

use App\Package;
use App\Models\Package;

class DisablePackageController extends Controller
{
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/EnablePackageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace App\Http\Controllers;

use App\Package;
use App\Models\Package;

class EnablePackageController extends Controller
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Illuminate\Http\Response;
use App\Http\Controllers\Controller;
use App\Package;
use App\Models\Package;

class PackageFavoritesController extends Controller
{
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/InternalApi/RatingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use App\Events\PackageRated;
use App\Exceptions\SelfAuthoredRatingException;
use App\Http\Controllers\Controller;
use App\Package;
use App\Models\Package;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Cache;
use willvincent\Rateable\Rating;
Expand All @@ -17,7 +17,7 @@ public function store()
request()->validate([
'package_id' => [
'required',
'exists:App\Package,id',
'exists:App\Models\Package,id',
],
'rating' => 'required',
]);
Expand Down
8 changes: 4 additions & 4 deletions app/Http/Controllers/InternalApi/ReviewsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

use Illuminate\Http\Response;
use App\Http\Controllers\Controller;
use App\Package;
use App\Review;
use App\Models\Package;
use App\Models\Review;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Cache;
use willvincent\Rateable\Rating;
Expand All @@ -17,7 +17,7 @@ public function store()
request()->validate([
'package_id' => [
'required',
'exists:App\Package,id',
'exists:App\Models\Package,id',
],
'review' => 'required',
]);
Expand All @@ -36,7 +36,7 @@ public function update()
request()->validate([
'package_id' => [
'required',
'exists:App\Package,id',
'exists:App\Models\Package,id',
],
'review' => 'required',
]);
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/PackageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Illuminate\View\View;
use Illuminate\Http\RedirectResponse;
use App\Http\Resources\PackageDetailResource;
use App\Package;
use App\Models\Package;

class PackageController extends Controller
{
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/PackageReviewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Illuminate\View\View;
use App\Http\Resources\PackageDetailResource;
use App\Package;
use App\Models\Package;

class PackageReviewController extends Controller
{
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/SiteMapController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace App\Http\Controllers;

use App\Package;
use App\Models\Package;
use Spatie\Sitemap\Sitemap;
use Spatie\Sitemap\Tags\Url;

Expand Down
Loading

0 comments on commit 5a70f20

Please sign in to comment.