Oh Dear is the all-in-one monitoring tool for your entire website. We monitor uptime, SSL certificates, broken links, scheduled tasks and more. You'll get a notifications for us when something's wrong. All that paired with a developer friendly API and kick-ass documentation. O, and you'll also be able to create a public status page under a minute. Start monitoring using our free trial now.

Simplifying controllers

Original – by Freek Van der Herten – 4 minute read

In this blog post, I'd like to highlight two tips to make controllers in Laravel feel much lighter.

Controllers don't need to extend anything

At the time of this writing, this is what you get when you run php artisan make:controller:

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class MyController extends Controller
{
    //
}

This controller extends a base controller App\Http\Controllers\Controller. This is the content of that base controller.

namespace App\Http\Controllers;

use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;

class Controller extends BaseController
{
    use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
}

That controller extends another one: Illuminate\Routing\Controller. To keep this post short, I'm not going to paste the contents of that one here. Just know that it contains some functions to register middleware and some functions to call other methods on a controller.

There seems to be a widespread belief that, in order for a controller to work, it should extend the Illuminate-controller. But you know what? Controllers don't need to extend anything. Here's an example of a perfectly valid controller.

namespace App\Http\Controllers;

class MyController
{
   // just add some functions
}

In all our client projects at Spatie the controllers don't extend anything by default. If a controller needs to validate or authorize a request, we use the AuthorizesRequests or ValidatesRequests trait on that controller.

Controllers are better off without a default namespace

In a vanilla Laravel app, a controller lives in the App\Http\Controllers namespace. This is being set up by default in the RouteServiceProvider by that namespace call.

namespace App\Providers;

use Illuminate\Support\Facades\Route;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;

class RouteServiceProvider extends ServiceProvider
{
    /**
     * This namespace is applied to your controller routes.
     *
     * In addition, it is set as the URL generator's root namespace.
     *
     * @var string
     */
    protected $namespace = 'App\Http\Controllers';

    // ..

    protected function mapWebRoutes()
    {
        Route::middleware('web')
             ->namespace($this->namespace)
             ->group(base_path('routes/web.php'));
    }
}

This enables us to just use a string in the routes file to for example route an URL to a controller like App\Http\Controllers\MyController:

// in the web routes file

Route::get('my-url', 'MyController@index');

Sure, that default namespace saves us some keystrokes in the routes file, but that's the only advantage it gives us.

Let's see what advantages we gain by not setting up a default namespace. If you delete that protected $namespace and ->namespace call in the RouteServiceProvider you'll have to specify the fully qualified namespace in the routes file.

// in the web routes file

use App\Http\Controllers\MyController;

Route::get('my-url', [MyController::class, 'index']);

If you only use one method in your controller, you could opt to use __invoke(). By using that method, you don't need that tuple notation anymore in the routes file.

// in the web routes file

use App\Http\Controllers\MyController;

// isn't this beautiful?
Route::get('my-url', MyController::class);

Replacing a short string based reference by a the full qualified namespace of a controller has several benefits. If you use an IDE like PhpStorm, it now knows which class is being used. When you start typing a class, it'll try to autocomplete it. You can also click through the MyController::class. Nice! If you refactor your controller or its namespace, PhpStorm will automatically update the routes file. Those are all big wins!

Also, if you now want to use another namespace for your controller, you can simply do so:

// in the web routes file

// alternative namespace
use App\Front\Http\AlternativeNamespace\MyController;

Route::get('my-url', MyController::class);

In closing

Laravel tries to make it easy for newcomers by providing some traits to scaffolded controllers by default and by setting up a default namespace. But if you have a bit of experience, I highly recommend not letting your controller extend anything by default and not using a default namespace.

Maybe the next version of Laravel should scaffold a class (without extending anything) as a controller and not use a default namespace. Do you agree? Let me know why or why not in the comments below.

Stay up to date with all things Laravel, PHP, and JavaScript.

You can follow me on these platforms:

On all these platforms, regularly share programming tips, and what I myself have learned in ongoing projects.

Every month I send out a newsletter containing lots of interesting stuff for the modern PHP developer.

Expect quick tips & tricks, interesting tutorials, opinions and packages. Because I work with Laravel every day there is an emphasis on that framework.

Rest assured that I will only use your email address to send you the newsletter and will not use it for any other purposes.

Comments

What are your thoughts on "Simplifying controllers"?

Comments powered by Laravel Comments
Want to join the conversation? Log in or create an account to post a comment.

Webmentions

Robin Hood liked on 29th June 2020
adam liked on 27th June 2020
The great one retweeted on 27th June 2020
The great one liked on 27th June 2020
Ryan Weber liked on 27th June 2020
apit liked on 27th June 2020
Mohit Mamoria liked on 27th June 2020
Murali ⌘ Krishna liked on 27th June 2020
Abhishek Sarmah retweeted on 27th June 2020
AFC_Vote_Bernie retweeted on 27th June 2020
Jimit 👨🏽‍💻 liked on 27th June 2020
AFC_Vote_Bernie liked on 27th June 2020
pynade.com liked on 27th June 2020
Edy Tanto liked on 27th June 2020
JOHN DOE liked on 27th June 2020
Michael Dyrynda liked on 27th June 2020
Oilmone liked on 27th June 2020
Freddy Vargas liked on 27th June 2020
Juan Fuentes liked on 26th June 2020
Maarten Buis liked on 26th June 2020
Daniel Freitas liked on 26th June 2020
James Anelay 🌱 liked on 26th June 2020
Optimus Debugger✨ liked on 26th June 2020
Frank Sepulveda liked on 26th June 2020
Marko liked on 26th June 2020
Nathan Snyder liked on 26th June 2020
Andre Sayej liked on 26th June 2020
José Cage liked on 26th June 2020
Martin Keck liked on 26th June 2020
Doug Black Jr liked on 26th June 2020
Baspa Development liked on 26th June 2020
Taylor Otwell 🪐 replied on 26th June 2020
Joking aside... I use the Authorizes one *a lot* the other two I don't care about and would be fine with them not being in the default
Ludo Hartzema liked on 26th June 2020
Rolf den Hartog 🏡 liked on 26th June 2020
Bill Clark liked on 26th June 2020
Freek Van der Herten replied on 26th June 2020
I can see why it’s the default. Laravel’s philosophy is to come with batteries included and have things preconfigured for you. People don’t have to think about these traits, they can just use the functionality. And there certainly is value with taking that approach 👍
Freek Van der Herten replied on 26th June 2020
Personally, I prefer the lightness that not letting the controller extend something brings to the table. It signals to me that a controller is just a plain class, there’s nothing magic about it. For the longest time I though extending from the base controller was a necessity.
Nikola Poša replied on 26th June 2020
Loading only those things that are really necessary for the controller to work instead of eagerly loading all the specialized traits seems like a very clever simplification to me.
Taylor Otwell 🪐 replied on 26th June 2020
that isn't the good kind of simplication 😬
Jay Linski 🐿 liked on 19th June 2020
Mariano Moreyra liked on 18th June 2020
Martin Medina liked on 18th June 2020
Tommy liked on 18th June 2020
Arslan Ramay liked on 18th June 2020
Jonny Nott liked on 18th June 2020
Manojkiran liked on 18th June 2020
Sadegh PM liked on 18th June 2020
Luis Jesus liked on 18th June 2020
Rolf den Hartog 🏡 retweeted on 18th June 2020
Thijs Kok liked on 18th June 2020
Florian Voutzinos ⚡ liked on 18th June 2020
Willan Correia liked on 18th June 2020
Matthieu Napoli liked on 18th June 2020
Manuel Ortega マヌエル liked on 18th June 2020
Mazedul Islam Khan liked on 18th June 2020
David Saavedra liked on 26th May 2020
Kjell Knapen liked on 26th May 2020
Milos liked on 26th May 2020
PatricNox liked on 26th May 2020
RR liked on 26th May 2020
Sebastian Rasch liked on 26th May 2020
Diego Calle liked on 26th May 2020
Abishek liked on 26th May 2020
Manuel Pirker-Ihl liked on 26th May 2020
Swaggiee liked on 26th May 2020
Matt Kingshott 🚀 liked on 26th May 2020
Jozsef replied on 26th May 2020
My phpStorm is smart enough to interpret the string as a controller and action it looks at the $namespace variable to get the namespace
Epistol 👏 🧼 liked on 26th May 2020
Ok9xNirab 👌 👌 liked on 26th May 2020
Burhan Ibrahimi liked on 26th May 2020
Nay Zaw Oo 🕵🏼 liked on 26th May 2020
Marc-André Martin liked on 26th May 2020
Abrar Ahmad liked on 26th May 2020
ahmed abdelaal retweeted on 26th May 2020
RJ Garcia liked on 26th May 2020
Andrew Schmelyun retweeted on 26th May 2020
PHP Synopsis retweeted on 26th May 2020
Andrew Schmelyun liked on 26th May 2020
Juha Remes retweeted on 26th May 2020
Juha Remes liked on 26th May 2020
Joe FRANCOIS liked on 26th May 2020
Ihor Vorotnov liked on 26th May 2020
Tom Witkowski liked on 26th May 2020
Snr Apst. MAKANAKY liked on 26th May 2020
James liked on 26th May 2020
Daniele Zanfardino liked on 26th May 2020
Jens liked on 26th May 2020
Jarrod Tomholt liked on 26th May 2020
Pakistan1st liked on 26th May 2020
Kenne.be liked on 26th May 2020
ARIF MAHMUD RANA liked on 26th May 2020
Ruud Schaaphuizen liked on 26th May 2020
Dominik Kowalski liked on 26th May 2020
Chema Trigueros liked on 26th May 2020
Rafael Pazio liked on 26th May 2020
James King liked on 26th May 2020
/dev/caneco liked on 26th May 2020
Peter Brinck 🤘 liked on 26th May 2020
duc liked on 26th May 2020
Julien Bourdeau liked on 26th May 2020
George Boot liked on 26th May 2020
matz9r liked on 26th May 2020
Sohail Abbasi liked on 26th May 2020
Jose Alberto Lopez liked on 26th May 2020
Luka Vavetić liked on 26th May 2020
M. Vug liked on 26th May 2020
Yann Haefliger liked on 26th May 2020
Matt Fletcher liked on 26th May 2020
cicnavi liked on 26th May 2020
Martijn Bastiaansen liked on 26th May 2020
Pär Thernström liked on 26th May 2020
Francois-Xavier liked on 26th May 2020
Daniel Helen liked on 26th May 2020
WaveHack liked on 26th May 2020
Julien RAVIA liked on 26th May 2020
Tamas Erdelyi liked on 26th May 2020
Mihajlo Protic liked on 26th May 2020
Sami Ullah Shah liked on 26th May 2020
Rafael Pazio retweeted on 26th May 2020
Piotr Nowak liked on 26th May 2020
Charles Bowen liked on 26th May 2020
Erick Patrick liked on 26th May 2020
Jamie Shiers liked on 26th May 2020
Craig Lovelock liked on 26th May 2020
Orest liked on 26th May 2020
Quinnaldinho liked on 26th May 2020
Guus liked on 26th May 2020
Linus Juhlin retweeted on 26th May 2020
elseif liked on 26th May 2020
Nicolas Kuster liked on 26th May 2020
Sidirgot liked on 26th May 2020
Linus Juhlin liked on 26th May 2020
Jachim Coudenys liked on 26th May 2020
Sumon Molla Selim, FRSA liked on 26th May 2020
Gerard Luque liked on 26th May 2020
Jeffrey Angenent liked on 26th May 2020
Joren Van Hocht liked on 26th May 2020
Peirs Jameson liked on 26th May 2020
Preetesh liked on 26th May 2020
Milan Chheda 👨‍💻 liked on 26th May 2020
Karolis Narkevicius liked on 26th May 2020
⚡ 404 ⚡ liked on 26th May 2020
Simon Skymon liked on 26th May 2020
Laravelista liked on 26th May 2020
Vikas Roy liked on 26th May 2020
Karolis Narkevicius replied on 26th May 2020
Same.
Jaume Sala liked on 26th May 2020
RehabHero liked on 26th May 2020
dylanharbour liked on 26th May 2020
Yerson Arce liked on 26th May 2020
Ozzie Neher liked on 26th May 2020
Manpreet Rathore liked on 26th May 2020
Faisal ahmed liked on 26th May 2020
Michael Rog liked on 26th May 2020
Ishan Vyas liked on 26th May 2020
Mark Almadin retweeted on 26th May 2020
Hamid Vetr liked on 26th May 2020
Leonardo Prabangkoro liked on 26th May 2020
Alexandre Demers liked on 26th May 2020
Mohan Raj liked on 26th May 2020
José Cage retweeted on 26th May 2020
woody mendoza liked on 26th May 2020
Oliver Kaufmann liked on 26th May 2020
José Cage liked on 26th May 2020
Victor Dauchy liked on 26th May 2020
Stefan Danaita liked on 26th May 2020
Willan Correia liked on 26th May 2020
Daniel Lucas liked on 26th May 2020
Wade Striebel liked on 26th May 2020
Marisa Clardy liked on 26th May 2020
Enzo Innocenzi liked on 26th May 2020
. replied on 26th May 2020
but without this laravel Route::auth stop working :(
Most controllers have multiple actions
Vargas Josue retweeted on 26th May 2020
antweny 🇹🇿 liked on 26th May 2020
Espiridion Larosa retweeted on 26th May 2020
Vargas Josue liked on 26th May 2020
Espiridion Larosa liked on 26th May 2020
Felix Costa liked on 26th May 2020
Adib Hanna retweeted on 26th May 2020
Haneef Ansari liked on 26th May 2020
Mike Ferrara liked on 26th May 2020
Liam Hammett liked on 26th May 2020
Alexander Six liked on 26th May 2020
therouv liked on 26th May 2020
Tom Westrick liked on 26th May 2020
ダビッド トレス liked on 26th May 2020
Faisal Hourani liked on 26th May 2020
Federico Corsaro liked on 26th May 2020
De Gracia Mathieu liked on 26th May 2020
James Kingsley liked on 26th May 2020
DirtyToothBrush retweeted on 26th May 2020
Mladen Danić liked on 26th May 2020
Jamie York liked on 26th May 2020
DirtyToothBrush liked on 26th May 2020
Owen Voke liked on 26th May 2020
Ryan liked on 26th May 2020
James Burrow liked on 26th May 2020
Clevon Noel 🇬🇩 liked on 26th May 2020
Skugga liked on 26th May 2020
Jacob liked on 26th May 2020
Adam Huttler liked on 26th May 2020
Josh Vittetoe liked on 26th May 2020
Principe do Oceano liked on 26th May 2020
Sean Talbot liked on 26th May 2020
Vaggelis Yfantis liked on 26th May 2020
Synax liked on 26th May 2020
Sheng liked on 26th May 2020
Freek Van der Herten replied on 26th May 2020
❤️❤️❤️
Austen Cameron liked on 26th May 2020
ArielMejiaDev replied on 26th May 2020
Since your 2019 talk in laracon, I try this approach but all the Auth routes get namespace errors, but I got the idea and it seems a good idea.
Jason McCreary replied on 26th May 2020
And I know why. 😎 twitter.com/laravelshift/s…
𝗈𝗌𝗆𝖾𝗅𝗅 liked on 26th May 2020
Musa  liked on 26th May 2020
Bill Yanelli liked on 26th May 2020
NUNO MADURO liked on 26th May 2020
Ed Grosvenor liked on 26th May 2020
Miguel Piedrafita 🚀 liked on 26th May 2020
Nanderson Castro liked on 26th May 2020
Majid Alavizadeh liked on 26th May 2020
Doug Black Jr liked on 26th May 2020
eraldgreca liked on 26th May 2020
Gavin Taylor liked on 26th May 2020
Brian Kimball liked on 26th May 2020
Florian Voutzinos ⚡ liked on 26th May 2020
Miguel Piedrafita 🚀 replied on 26th May 2020
This, and Model::unguard()
Austen Cameron replied on 26th May 2020
Interesting, what do you do instead?
Steve McDougall replied on 26th May 2020
I remove it every time too, I prefer to import the class names in the routes file when working with Laravel.
Roman Pronskiy liked on 17th December 2019
Knight  liked on 14th December 2019
Loris Roncali liked on 13th December 2019
Loris Roncali retweeted on 13th December 2019
Samuel Stidham retweeted on 13th December 2019
Samuel Stidham liked on 13th December 2019
M00dle liked on 13th December 2019
Jino Antony liked on 13th December 2019
kronos_I retweeted on 13th December 2019
Clevon Noel 🇬🇩 liked on 13th December 2019
Hardik Shah liked on 13th December 2019
Bill Condo replied on 12th December 2019
Love the out of the box thinking, but I see this leading to confusion when on boarding new folks to a project. I don't see the benefits overcoming the costs.
Adib Hanna retweeted on 12th December 2019
James Hemery retweeted on 12th December 2019
James Hemery liked on 12th December 2019
rikwillems liked on 12th December 2019
Patrique Ouimet retweeted on 12th December 2019
Patrique Ouimet liked on 12th December 2019
WhoAmI liked on 12th December 2019
Devon Mather liked on 12th December 2019
BOUKHLIF Mohamed liked on 12th December 2019
Ben James liked on 12th December 2019
Miguel Piedrafita 🚀 liked on 12th December 2019
Salman Zafar liked on 12th December 2019
Salman Zafar retweeted on 12th December 2019
Flip.hr liked on 12th December 2019
JJ (Vulgo Jorge Gonçalves) liked on 12th December 2019
Agasi Gilang Persada liked on 12th December 2019
qrazi retweeted on 12th December 2019
Daniele Zanfardino liked on 12th December 2019
mahmudur rahman liked on 12th December 2019
Mozammil liked on 12th December 2019
Julien Bourdeau liked on 12th December 2019
Azwan Halim liked on 12th December 2019
Thore Sünert liked on 12th December 2019
Estaba muerto, estaba muerto! liked on 12th December 2019
Bashir replied on 12th December 2019
I think that in the near future controllers will be so light that they will become useless. Recently, people have put on a diet controllers that they hope to see them slimfit. IMHO
harun thuo liked on 12th December 2019
Felipe Podestá liked on 12th December 2019
Soare Costin liked on 12th December 2019
Freek Van der Herten replied on 12th December 2019
You’re clearly a pro 👍
André Breia liked on 12th December 2019
Peter Brinck 🤘 liked on 12th December 2019
Laravel Türkiye retweeted on 12th December 2019
albert liked on 12th December 2019
Roger Pence liked on 12th December 2019
Laravel Türkiye liked on 12th December 2019
Elo liked on 12th December 2019
Manojkiran liked on 12th December 2019
Miguel San Martin replied on 12th December 2019
Haha that is live to the limit
SimFarming liked on 12th December 2019
Michael Aguiar liked on 12th December 2019
José Cage liked on 12th December 2019
rgj liked on 12th December 2019
Jeff Madsen replied on 12th December 2019
I actually did this for the first version of a very, very small app once. I wanted to completely minimize the amount of classes & boilerplate, only make it when I absolutely needed it Great exercise, not so scalable
𝗈𝗌𝗆𝖾𝗅𝗅 liked on 12th December 2019
Mohamed Said replied on 12th December 2019
Don jon replied on 12th December 2019
Thanks I just implemented it now. But I didn't remove the namespace, I used only the controller name as a string along with the __invoke
Jason McCreary replied on 12th December 2019
🤦‍♂️
Kawan Koding liked on 12th December 2019
Saman Zahedi replied on 12th December 2019
🤣🤣🤣
Mohamed Benhida replied on 12th December 2019
Just write everything on RouteServiceProvider and you won't need web.php haha
Khai Rahman retweeted on 12th December 2019
Shreyansh replied on 12th December 2019
Thank you sooooo much :)
Khai Rahman liked on 12th December 2019
نبيل الالمعي retweeted on 12th December 2019
Jeremy Brayton liked on 12th December 2019
Shreyansh liked on 12th December 2019
Tim replied on 12th December 2019
Can confirm this works!
Bruno CHIREZ liked on 12th December 2019
Mohamed Said replied on 12th December 2019
index.php and you won't need anything else. Be like @levelsio, he knows how to code like a real pro 😎
Doug Grubba liked on 12th December 2019
Thurstan Bowling liked on 12th December 2019
Mohamed Said replied on 12th December 2019
Just write everything in web.php and you won't need any controllers
Mario Bittencourt liked on 13th October 2019
aldo liked on 13th October 2019
Neil Carlo Faisan Sucuangco liked on 13th October 2019
Crisoforo Gaspar liked on 12th October 2019
Eve ? The Web Artisan ? ? liked on 12th October 2019
ThePHPGuy replied on 12th October 2019
I would like it to stay as it is. To the newcomers I've mentored it's been shown to be a more friendly approach. This is nice approach but if you have a lot of controllers the "use" section in the routed file will be huge.
Mubassir Hayat retweeted on 12th October 2019
ali ali liked on 12th October 2019
Juvenal Pengele liked on 12th October 2019
Ryan Weber liked on 12th October 2019
James liked on 12th October 2019
Julien Bourdeau liked on 12th October 2019
Raja Kannan ? liked on 12th October 2019
Chris Kankiewicz replied on 12th October 2019
Been doing this for a while. I like it a lot.
Chris Kankiewicz liked on 12th October 2019
Adrian Brown ? liked on 12th October 2019
BOUKHLIF Mohamed liked on 12th October 2019
Georg Thomassen liked on 12th October 2019
Devin Hyden liked on 12th October 2019
Paul Redmond ?? replied on 12th October 2019
I still trip myself up when using it because I’m used to using strings. I do like using this style ?
Miguel Piedrafita ? liked on 12th October 2019
Freek Van der Herten replied on 12th October 2019
I’m thinking if no namespace would be set by default it would be easier for newcomers, because there would be less magic
Tomasz Lotocki ?‍♂️ replied on 12th October 2019
Should your code be cleaner or IDE happier? I totally disagree with your statement as a newcomer. I do not want to see Laravel become configuration over convention. It has always been easy for newcomers and should stay that way. ?
Craig Potter liked on 12th October 2019
Franck liked on 12th October 2019
Karel replied on 11th October 2019
I like it and use it too ? only downside is that there are more conflicts on some git rebasing.
?????? liked on 11th October 2019
Daniele Rosario liked on 11th October 2019
Wesley van Klaveren liked on 11th October 2019
Simon Kollross liked on 11th October 2019
Dave Liddament liked on 11th October 2019
Craig Lovelock liked on 11th October 2019
mustaf ?‍?‍?‍? liked on 11th October 2019
Loki liked on 11th October 2019
George Drakakis ? liked on 11th October 2019
Lee Overy liked on 11th October 2019
Pascal van Gemert liked on 11th October 2019
Raul retweeted on 11th October 2019
Raul liked on 11th October 2019
Edwin I Arellano liked on 11th October 2019
ダビッド トレス retweeted on 11th October 2019
Matthew Suan retweeted on 11th October 2019
ダビッド トレス liked on 11th October 2019
Vishwanath liked on 11th October 2019
Serge Andriichuk ? liked on 11th October 2019
Tanzania Developers Society liked on 11th October 2019
Tanzania Developers Society retweeted on 11th October 2019
pxgamer liked on 11th October 2019
Yuri Sementsov liked on 11th October 2019
Jeff Sagal liked on 11th October 2019
Jérémy DECOOL liked on 11th October 2019
Rutvij replied on 11th October 2019
This approach made my routes files more readable. I liked it so much. Thanks for sharing it. ??
Muhammad Sumon Molla Selim liked on 11th October 2019
Mulia Nasution (mul14) retweeted on 11th October 2019
Mulia Nasution (mul14) liked on 11th October 2019
Florian Wartner liked on 11th October 2019
Benjamin Crozat liked on 11th October 2019
Mozammil liked on 11th October 2019
이현석 Hyunseok Lee liked on 11th October 2019
Agasi Gilang Persada liked on 11th October 2019
luis jury ? liked on 11th October 2019
Sam Snelling liked on 11th October 2019
Bill Yanelli liked on 11th October 2019
leunggamciu retweeted on 11th October 2019
Spatie retweeted on 11th October 2019
Matthew Poulter liked on 11th October 2019
Minh Quan liked on 11th October 2019
Oliver Kaufmann liked on 11th October 2019
JΞRRΞD liked on 11th October 2019
Logan H. Craft liked on 11th October 2019
Alfredo Martínez liked on 11th October 2019
Ed Grosvenor replied on 11th October 2019
I like it too. How do you guys then handle the auth routes, since the helper relies on the namespace? Or have you not hit that yet? I just added them to my own routes file by hand, skipping the helper. But wondered if there’s a shortcut.
Cyril de Wit liked on 11th October 2019
Paul Ayuk liked on 11th October 2019
Dennis de Swart liked on 11th October 2019
Rashidul Hasan replied on 11th October 2019
Nice! I'll try to do everything I can to let PHPStorm know more about my code.
Siddharth Ghedia liked on 11th October 2019
dowilcox retweeted on 11th October 2019
Abrory Salman liked on 11th October 2019
? Addoun Abdullah? retweeted on 11th October 2019
oluwajubelo loves VueJS ? liked on 11th October 2019
. replied on 11th October 2019
but in blade files my action routes get really long
Patrick Brouwers retweeted on 11th October 2019
Sam D Harris liked on 11th October 2019
Laravel Türkiye retweeted on 11th October 2019
pours.io liked on 11th October 2019
Patrick Brouwers liked on 11th October 2019
Michael Dyrynda replied on 11th October 2019
I’ve started doing this in a greenfield app. I dig.
Abrory Salman retweeted on 11th October 2019
Paul P liked on 11th October 2019
Rajesh Dewle liked on 11th October 2019
. liked on 11th October 2019
? Addoun Abdullah ? liked on 11th October 2019
Laravel Türkiye liked on 11th October 2019
Rashidul Hasan liked on 11th October 2019
Ⓜ️ fuz liked on 11th October 2019
oluwajubelo loves VueJS ? retweeted on 11th October 2019
dowilcox liked on 11th October 2019
Peyman Goldasteh ? liked on 11th October 2019
Stefan Beierl liked on 11th October 2019
bad bitch replied on 11th October 2019
"Better off" might not be the best way to put it. I do all of the things you mentioned, and I've got a default namespace. "Unnecessary" is more like it.?
Jamie Shiers liked on 11th October 2019
Danijel K. liked on 11th October 2019
Freek Van der Herten replied on 2nd October 2019
If not, mail me and I’ll take a look when I got a little time on my hands ?
Joren Van Hocht replied on 2nd October 2019
Going to rewatch them and see if one these strategies can solve the issue I'm facing right now ?
Joren Van Hocht replied on 2nd October 2019
Thanks man ?
Joren Van Hocht liked on 2nd October 2019
Uyo-obong liked on 13th August 2019
Guus liked on 13th August 2019
Kusha liked on 13th August 2019
Laurent B retweeted on 13th August 2019
Mitul Golakiya liked on 13th August 2019
Josh Bruce liked on 13th August 2019
Bobby Bouwmann liked on 13th August 2019
Ratting Gergely liked on 12th August 2019
Janos Papp liked on 12th August 2019
alaa m Ibrahim liked on 12th August 2019
Ashot Nalbandyan liked on 12th August 2019
Ashot Nalbandyan retweeted on 12th August 2019
Julius Ehrlich liked on 12th August 2019
이현석 Hyunseok Lee liked on 12th August 2019
Victor Guerrero liked on 12th August 2019
Franco Gilio liked on 12th August 2019
Drew Roberts liked on 12th August 2019
Charles Bowen liked on 12th August 2019
Marcin liked on 12th August 2019
Maulik Shah liked on 12th August 2019
Michaël De Boey liked on 12th August 2019
 Mario Mendoza  liked on 12th August 2019
David Cottila retweeted on 12th August 2019
 Mario Mendoza  retweeted on 12th August 2019
Renato VG liked on 12th August 2019
Anton Kristensen liked on 12th August 2019
Marcel Pociot ? retweeted on 12th August 2019
Adam Wathan liked on 12th August 2019
Spatie retweeted on 12th August 2019
Rajesh Dewle liked on 12th August 2019
Max Pshenichnikov liked on 12th August 2019
Juan Pablo ??‍? liked on 11th August 2019
iBoedel replied on 11th August 2019
Thank you for sharing. Looking fwd for Amsterdam
Khurram Shahzad liked on 11th August 2019
Melbourne Laravel retweeted on 11th August 2019
Roberto B liked on 11th August 2019
David liked on 11th August 2019
Thibault Lavoisey liked on 11th August 2019
patrosmania liked on 11th August 2019
Andikan Affiah liked on 10th August 2019
Strotgen liked on 10th August 2019
arondeparon liked on 10th August 2019
Stefan liked on 10th August 2019
Carlos Cruz retweeted on 10th August 2019
Ihor Vorotnov • 25% liked on 10th August 2019
od3n liked on 10th August 2019
Cody liked on 10th August 2019
ApoNie liked on 10th August 2019
Prasad Chinwal liked on 10th August 2019
Alejandro Vásquez N. liked on 10th August 2019
Miguel Piedrafita ?‍? liked on 10th August 2019
Burak Erdem liked on 10th August 2019
Pooyan R replied on 10th August 2019
I wish we could have you in our meetup in Copenhagen. :)
Pablo Román liked on 10th August 2019
Gültekin Yaman liked on 10th August 2019
Mak Man liked on 10th August 2019
Simon Payne liked on 10th August 2019
Simon Payne retweeted on 10th August 2019
Javier Quintana retweeted on 10th August 2019
Felipe Dalcin liked on 10th August 2019
Javier Quintana liked on 10th August 2019
Johnson Page liked on 10th August 2019
Gabriel liked on 10th August 2019
marco asperti liked on 10th August 2019
marco asperti retweeted on 10th August 2019
Laravel School replied on 10th August 2019
Ibm Plex mono looks amazing
Ulrich Anani liked on 10th August 2019
Laravel School retweeted on 10th August 2019
Ulrich Anani retweeted on 10th August 2019
Laravel School liked on 10th August 2019
Beta liked on 10th August 2019
Adrian Nürnberger ? replied on 10th August 2019
Nice talk thanks for sharing!
Adrian Nürnberger ? liked on 10th August 2019
Bilal retweeted on 10th August 2019
Wrends liked on 10th August 2019
Makabi Yelmis liked on 10th August 2019
envomer liked on 10th August 2019
Roman Pronskiy liked on 10th August 2019
Boris DEHOUMON liked on 10th August 2019
Clevon Noel ?? liked on 10th August 2019
Jeri liked on 10th August 2019
Jeri retweeted on 10th August 2019
JuanDMeGon retweeted on 10th August 2019
JuanDMeGon liked on 10th August 2019
swapnilsarwe liked on 10th August 2019
Ahmad Ripaldi liked on 10th August 2019
Elie Andraos retweeted on 10th August 2019
Craig Potter liked on 10th August 2019
Martin Medina liked on 10th August 2019
Jordan Hall retweeted on 10th August 2019
Jordan Hall liked on 10th August 2019
Adinnu Benedict retweeted on 9th August 2019
João Patrício liked on 9th August 2019
Adinnu Benedict liked on 9th August 2019
Andrew Clinton liked on 9th August 2019
Andrew Clinton retweeted on 9th August 2019
Wyatt liked on 9th August 2019
Mubassir Hayat retweeted on 9th August 2019
zorigitano liked on 9th August 2019
Mickaël Isaert liked on 9th August 2019
DN liked on 9th August 2019
Lib liked on 9th August 2019
Herman Schutte liked on 9th August 2019
Andrei Scripcaru liked on 9th August 2019
PHP Synopsis retweeted on 9th August 2019
Axel Alvarado liked on 9th August 2019
Michael Dyrynda retweeted on 9th August 2019
Solum DeSignum liked on 9th August 2019
Gareth Redfern retweeted on 9th August 2019
Mozammil liked on 9th August 2019
Gareth Redfern liked on 9th August 2019
Vitaly Yushkevich liked on 9th August 2019
Joe Rushton liked on 9th August 2019
Maarten Buis liked on 9th August 2019
[object Object] liked on 9th August 2019
Brian replied on 9th August 2019
Nice talk! Id watch SpatieCasts: the making and maintaining of Spatie packages. Hell maybe even subscribe haha
Richard Ottinger liked on 9th August 2019
Chea Bonnak liked on 9th August 2019
Günther Debrauwer liked on 9th August 2019
Lee Overy liked on 9th August 2019
Manuel Teuber liked on 9th August 2019
ArielSalvadorDev liked on 9th August 2019
Ramiro Varandas Jr liked on 9th August 2019
ArielSalvadorDev retweeted on 9th August 2019
alan wilson retweeted on 9th August 2019
Ray Blair liked on 9th August 2019
Anne Koep retweeted on 9th August 2019
Alan Scott‽ liked on 9th August 2019
Vítor Arjol liked on 9th August 2019
Luis Cortés liked on 9th August 2019
Dennis Rodis liked on 9th August 2019
Muhammad Shafeeq liked on 9th August 2019
laravelgr retweeted on 9th August 2019
OZA ?? liked on 9th August 2019
zaichaopan liked on 9th August 2019
Flamur Mavraj liked on 9th August 2019
Jarryd liked on 9th August 2019
Paul Rose liked on 9th August 2019
Vladyslav liked on 9th August 2019
Jino Antony liked on 9th August 2019
Jess Archer ?‍? liked on 9th August 2019
ariesw liked on 9th August 2019
Patrick Brouwers liked on 9th August 2019
Ed Grosvenor liked on 9th August 2019
Tom Witkowski retweeted on 9th August 2019
Tom Witkowski liked on 9th August 2019
Gurinder Chauhan retweeted on 9th August 2019
Matt Libera liked on 9th August 2019
Stephan Köllen liked on 9th August 2019
tokobuku_jiban liked on 9th August 2019
Matt Murtaugh liked on 9th August 2019
Patrick Brouwers retweeted on 9th August 2019
Vaibhav Pardeshi liked on 9th August 2019
Osasu Aebong liked on 9th August 2019
Julio Serpone liked on 9th August 2019
eCreeth liked on 9th August 2019
austin kregel liked on 9th August 2019
Rudi van Zandwijk liked on 9th August 2019
Eddie Palmans liked on 9th August 2019
Mihai liked on 9th August 2019
Rod Elias liked on 9th August 2019
mwm [ ⚡️ , ? ] liked on 9th August 2019
Ashish K. Poudel liked on 9th August 2019
Carlos Rodríguez retweeted on 9th August 2019
Mithicher Baro liked on 9th August 2019
Mithicher Baro retweeted on 9th August 2019
Osasu Aebong retweeted on 9th August 2019
docker system prune liked on 9th August 2019
oluwajubelo loves VueJS ? liked on 9th August 2019
kapil retweeted on 9th August 2019
Célien Boillat ?? liked on 9th August 2019
Ruslan liked on 9th August 2019
Levis Orgil liked on 9th August 2019
NUNO MADURO ? liked on 9th August 2019
jaouad liked on 9th August 2019
jaouad retweeted on 9th August 2019
Bas de Groot liked on 9th August 2019
Cameron Scott liked on 9th August 2019
Brendan Urquhart liked on 9th August 2019
Victor Hugo retweeted on 9th August 2019
Vaughany liked on 9th August 2019
Edwin I Arellano liked on 9th August 2019
Arash liked on 9th August 2019
Victor Hugo liked on 9th August 2019
Daniel Schmitz liked on 9th August 2019
Roman Pronskiy liked on 25th July 2019
Ariel Costa liked on 25th July 2019
Skugga liked on 25th July 2019
Hazz Azimi liked on 25th July 2019
SergioS liked on 25th July 2019
Marian liked on 25th July 2019
Stefan Tanevski liked on 25th July 2019
Rémi Latrille liked on 25th July 2019
Kennedy Tedesco liked on 25th July 2019
Jarryd liked on 25th July 2019
Duy Ha Nguyen liked on 25th July 2019
Mark Myers liked on 25th July 2019
Ned Fenstermacher retweeted on 25th July 2019
Daryl Geyer II retweeted on 25th July 2019
Daryl Geyer II liked on 25th July 2019
Lee Cox liked on 25th July 2019
Knight  liked on 25th July 2019
Lars Schou ?? liked on 25th July 2019
Dario Diaz liked on 24th July 2019
Luke Curtis liked on 24th July 2019
jamieconnor liked on 24th July 2019
Guus liked on 24th July 2019
Kevin Morris liked on 24th July 2019
Guus retweeted on 24th July 2019
Axel Pardemann liked on 24th July 2019
Axel Pardemann retweeted on 24th July 2019
eminiarts liked on 24th July 2019
Powolny Marcel ?‍? liked on 24th July 2019
Drew Roberts liked on 24th July 2019
Powolny Marcel ?‍? retweeted on 24th July 2019
Laravel Academy Cape Town liked on 24th July 2019
Duncan McClean liked on 24th July 2019
Wyatt liked on 24th July 2019
Tiagosimoes liked on 24th July 2019
Windu liked on 24th July 2019
Robin Dirksen liked on 24th July 2019
Emmanuel Oduro liked on 24th July 2019
MD Iyasin Arafat liked on 24th July 2019
Батыр liked on 24th July 2019
zorigitano liked on 24th July 2019
Alexander Diachenko liked on 24th July 2019
Robert S. Getty III liked on 24th July 2019
oluwajubelo loves VueJS ? liked on 24th July 2019
Sanket Gandhi ? ? liked on 24th July 2019
Zaff Ja retweeted on 24th July 2019
Roy Francis Ponce de Leon liked on 24th July 2019
Prasad Chinwal liked on 24th July 2019
Sanket Gandhi?? retweeted on 24th July 2019
이현석 Hyunseok Lee liked on 24th July 2019
Yassir Awad liked on 24th July 2019
Hardik Shah liked on 24th July 2019
Ilya Sakovich liked on 24th July 2019
Michiel Abé liked on 24th July 2019
Adrian Brown ?? liked on 24th July 2019
Alan Scott‽ liked on 24th July 2019
? Yogesh Chatrola ? liked on 24th July 2019
Mike liked on 24th July 2019
Bee business liked on 24th July 2019
Thibault Lavoisey liked on 24th July 2019
Thore Sünert liked on 24th July 2019
Martin Carlin liked on 24th July 2019
Logan H. Craft liked on 24th July 2019
Hadjidoro ?? liked on 24th July 2019
kapil retweeted on 24th July 2019
Omar Andrés Barbosa Ortiz liked on 24th July 2019
jason liked on 24th July 2019
Mansa Musa liked on 24th July 2019
ósásù aèbóng retweeted on 24th July 2019
Alex Hackney liked on 24th July 2019
Filipe liked on 24th July 2019
David liked on 24th July 2019
Peter Brinck ? liked on 24th July 2019
Marco Bellido retweeted on 24th July 2019
Tony Messias liked on 24th July 2019
ósásù aèbóng liked on 24th July 2019
Terry Tan liked on 24th July 2019
Hamed liked on 24th July 2019
Harry ? liked on 24th July 2019
Rizwan Aslam retweeted on 24th July 2019
Gareth Redfern liked on 24th July 2019
Pepe García liked on 24th July 2019
owls liked on 24th July 2019
Christoph Rumpel ? liked on 24th July 2019
Adib Hanna liked on 24th July 2019
Johnathan Barrett liked on 24th July 2019
Matthew Poulter liked on 24th July 2019
Oliver Musovski liked on 24th July 2019
Whisk retweeted on 24th July 2019
Whisk liked on 24th July 2019
Derek Martin liked on 24th July 2019
Adam ?? Mench liked on 24th July 2019
Adib Hanna retweeted on 24th July 2019
Mubashar Iqbal liked on 24th July 2019
James Mills liked on 24th July 2019
Simon Montoya P liked on 24th July 2019
Christopher Dosin liked on 24th July 2019
Teun de Kleijne liked on 24th July 2019
Gareth Redfern retweeted on 24th July 2019
Rizwan Aslam liked on 24th July 2019
technomike retweeted on 24th July 2019
Dries Vints retweeted on 24th July 2019
Iven liked on 24th July 2019
Miguel Orellana liked on 24th July 2019
Ismail Xahy retweeted on 24th July 2019
dowilcox liked on 24th July 2019
Славка liked on 24th July 2019
technomike liked on 24th July 2019
Richard Ottinger liked on 24th July 2019
Spatie retweeted on 24th July 2019
Maurizio Lepora liked on 24th July 2019
Osmar Alves liked on 24th July 2019
Fakhar Khan liked on 24th July 2019
Dries Vints liked on 24th July 2019
Harish Patel liked on 24th July 2019
Patrick Muriungi liked on 24th July 2019
James Healey liked on 24th July 2019
LaravelMade retweeted on 24th July 2019
Marcel Pociot ? retweeted on 24th July 2019
Stefan Bauer liked on 24th July 2019
Florian Voutzinos ⚡ liked on 24th July 2019
Maurizio Lepora retweeted on 24th July 2019
Ismail Xahy liked on 24th July 2019