Skip to content

[12.x] Consistency with Laravel's best practices #10254

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions authorization.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ To authorize an action using gates, you should use the `allows` or `denies` meth

namespace App\Http\Controllers;

use App\Http\Controllers\Controller;
use App\Models\Post;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
Expand Down Expand Up @@ -542,7 +541,6 @@ The `App\Models\User` model that is included with your Laravel application inclu

namespace App\Http\Controllers;

use App\Http\Controllers\Controller;
use App\Models\Post;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
Expand Down Expand Up @@ -577,7 +575,6 @@ Remember, some actions may correspond to policy methods like `create` that do no

namespace App\Http\Controllers;

use App\Http\Controllers\Controller;
use App\Models\Post;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
Expand Down Expand Up @@ -612,7 +609,6 @@ Like the `can` method, this method accepts the name of the action you wish to au

namespace App\Http\Controllers;

use App\Http\Controllers\Controller;
use App\Models\Post;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
Expand Down
1 change: 0 additions & 1 deletion controllers.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ Or, you may find it convenient to specify middleware within your controller clas

namespace App\Http\Controllers;

use App\Http\Controllers\Controller;
use Illuminate\Routing\Controllers\HasMiddleware;
use Illuminate\Routing\Controllers\Middleware;

Expand Down
1 change: 0 additions & 1 deletion database.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ To run a basic SELECT query, you may use the `select` method on the `DB` facade:

namespace App\Http\Controllers;

use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\DB;
use Illuminate\View\View;

Expand Down
1 change: 0 additions & 1 deletion eloquent.md
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,6 @@ Of course, when using Eloquent, we don't only need to retrieve models from the d

namespace App\Http\Controllers;

use App\Http\Controllers\Controller;
use App\Models\Flight;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
Expand Down
1 change: 0 additions & 1 deletion events.md
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,6 @@ To dispatch an event, you may call the static `dispatch` method on the event. Th
namespace App\Http\Controllers;

use App\Events\OrderShipped;
use App\Http\Controllers\Controller;
use App\Models\Order;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
Expand Down
1 change: 0 additions & 1 deletion facades.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ The `Facade` base class makes use of the `__callStatic()` magic-method to defer

namespace App\Http\Controllers;

use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Cache;
use Illuminate\View\View;

Expand Down
1 change: 0 additions & 1 deletion filesystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,6 @@ In web applications, one of the most common use-cases for storing files is stori

namespace App\Http\Controllers;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;

class UserAvatarController extends Controller
Expand Down
1 change: 0 additions & 1 deletion frontend.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ After installing Inertia into your Laravel application, you will write routes an

namespace App\Http\Controllers;

use App\Http\Controllers\Controller;
use App\Models\User;
use Inertia\Inertia;
use Inertia\Response;
Expand Down
1 change: 0 additions & 1 deletion logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ You may call any of these methods to log a message for the corresponding level.

namespace App\Http\Controllers;

use App\Http\Controllers\Controller;
use App\Models\User;
use Illuminate\Support\Facades\Log;
use Illuminate\View\View;
Expand Down
1 change: 0 additions & 1 deletion mail.md
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,6 @@ To send a message, use the `to` method on the `Mail` [facade](/docs/{{version}}/

namespace App\Http\Controllers;

use App\Http\Controllers\Controller;
use App\Mail\OrderShipped;
use App\Models\Order;
use Illuminate\Http\RedirectResponse;
Expand Down
1 change: 0 additions & 1 deletion pagination.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ In this example, the only argument passed to the `paginate` method is the number

namespace App\Http\Controllers;

use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\DB;
use Illuminate\View\View;

Expand Down
5 changes: 0 additions & 5 deletions queues.md
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,6 @@ Once you have written your job class, you may dispatch it using the `dispatch` m

namespace App\Http\Controllers;

use App\Http\Controllers\Controller;
use App\Jobs\ProcessPodcast;
use App\Models\Podcast;
use Illuminate\Http\RedirectResponse;
Expand Down Expand Up @@ -837,7 +836,6 @@ If you would like to specify that a job should not be immediately available for

namespace App\Http\Controllers;

use App\Http\Controllers\Controller;
use App\Jobs\ProcessPodcast;
use App\Models\Podcast;
use Illuminate\Http\RedirectResponse;
Expand Down Expand Up @@ -903,7 +901,6 @@ If you would like to dispatch a job immediately (synchronously), you may use the

namespace App\Http\Controllers;

use App\Http\Controllers\Controller;
use App\Jobs\ProcessPodcast;
use App\Models\Podcast;
use Illuminate\Http\RedirectResponse;
Expand Down Expand Up @@ -1067,7 +1064,6 @@ By pushing jobs to different queues, you may "categorize" your queued jobs and e

namespace App\Http\Controllers;

use App\Http\Controllers\Controller;
use App\Jobs\ProcessPodcast;
use App\Models\Podcast;
use Illuminate\Http\RedirectResponse;
Expand Down Expand Up @@ -1125,7 +1121,6 @@ If your application interacts with multiple queue connections, you may specify w

namespace App\Http\Controllers;

use App\Http\Controllers\Controller;
use App\Jobs\ProcessPodcast;
use App\Models\Podcast;
use Illuminate\Http\RedirectResponse;
Expand Down
1 change: 0 additions & 1 deletion redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ You may interact with Redis by calling various methods on the `Redis` [facade](/

namespace App\Http\Controllers;

use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Redis;
use Illuminate\View\View;

Expand Down