Skip to content

Commit 690f920

Browse files
Consistency with Laravel's best practices (#10254)
1 parent 594fe1b commit 690f920

13 files changed

+0
-20
lines changed

authorization.md

-4
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ To authorize an action using gates, you should use the `allows` or `denies` meth
8787

8888
namespace App\Http\Controllers;
8989

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

543542
namespace App\Http\Controllers;
544543

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

578576
namespace App\Http\Controllers;
579577

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

613610
namespace App\Http\Controllers;
614611

615-
use App\Http\Controllers\Controller;
616612
use App\Models\Post;
617613
use Illuminate\Http\RedirectResponse;
618614
use Illuminate\Http\Request;

controllers.md

-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ Or, you may find it convenient to specify middleware within your controller clas
125125

126126
namespace App\Http\Controllers;
127127

128-
use App\Http\Controllers\Controller;
129128
use Illuminate\Routing\Controllers\HasMiddleware;
130129
use Illuminate\Routing\Controllers\Middleware;
131130

database.md

-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ To run a basic SELECT query, you may use the `select` method on the `DB` facade:
141141

142142
namespace App\Http\Controllers;
143143

144-
use App\Http\Controllers\Controller;
145144
use Illuminate\Support\Facades\DB;
146145
use Illuminate\View\View;
147146

eloquent.md

-1
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,6 @@ Of course, when using Eloquent, we don't only need to retrieve models from the d
730730

731731
namespace App\Http\Controllers;
732732

733-
use App\Http\Controllers\Controller;
734733
use App\Models\Flight;
735734
use Illuminate\Http\RedirectResponse;
736735
use Illuminate\Http\Request;

events.md

-1
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,6 @@ To dispatch an event, you may call the static `dispatch` method on the event. Th
586586
namespace App\Http\Controllers;
587587

588588
use App\Events\OrderShipped;
589-
use App\Http\Controllers\Controller;
590589
use App\Models\Order;
591590
use Illuminate\Http\RedirectResponse;
592591
use Illuminate\Http\Request;

facades.md

-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ The `Facade` base class makes use of the `__callStatic()` magic-method to defer
158158

159159
namespace App\Http\Controllers;
160160

161-
use App\Http\Controllers\Controller;
162161
use Illuminate\Support\Facades\Cache;
163162
use Illuminate\View\View;
164163

filesystem.md

-1
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,6 @@ In web applications, one of the most common use-cases for storing files is stori
559559

560560
namespace App\Http\Controllers;
561561

562-
use App\Http\Controllers\Controller;
563562
use Illuminate\Http\Request;
564563

565564
class UserAvatarController extends Controller

frontend.md

-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ After installing Inertia into your Laravel application, you will write routes an
125125

126126
namespace App\Http\Controllers;
127127

128-
use App\Http\Controllers\Controller;
129128
use App\Models\User;
130129
use Inertia\Inertia;
131130
use Inertia\Response;

logging.md

-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ You may call any of these methods to log a message for the corresponding level.
213213

214214
namespace App\Http\Controllers;
215215

216-
use App\Http\Controllers\Controller;
217216
use App\Models\User;
218217
use Illuminate\Support\Facades\Log;
219218
use Illuminate\View\View;

mail.md

-1
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,6 @@ To send a message, use the `to` method on the `Mail` [facade](/docs/{{version}}/
920920

921921
namespace App\Http\Controllers;
922922

923-
use App\Http\Controllers\Controller;
924923
use App\Mail\OrderShipped;
925924
use App\Models\Order;
926925
use Illuminate\Http\RedirectResponse;

pagination.md

-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ In this example, the only argument passed to the `paginate` method is the number
4848

4949
namespace App\Http\Controllers;
5050

51-
use App\Http\Controllers\Controller;
5251
use Illuminate\Support\Facades\DB;
5352
use Illuminate\View\View;
5453

queues.md

-5
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,6 @@ Once you have written your job class, you may dispatch it using the `dispatch` m
793793

794794
namespace App\Http\Controllers;
795795

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

838837
namespace App\Http\Controllers;
839838

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

904902
namespace App\Http\Controllers;
905903

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

10681065
namespace App\Http\Controllers;
10691066

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

11261122
namespace App\Http\Controllers;
11271123

1128-
use App\Http\Controllers\Controller;
11291124
use App\Jobs\ProcessPodcast;
11301125
use App\Models\Podcast;
11311126
use Illuminate\Http\RedirectResponse;

redis.md

-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,6 @@ You may interact with Redis by calling various methods on the `Redis` [facade](/
245245

246246
namespace App\Http\Controllers;
247247

248-
use App\Http\Controllers\Controller;
249248
use Illuminate\Support\Facades\Redis;
250249
use Illuminate\View\View;
251250

0 commit comments

Comments
 (0)