Laravel – Using (:any?) wildcard for ALL routes?

Laravel 5 This solution works fine on Laravel 5: Route::get(‘/admin’, function () { // url /admin }); Route::get(‘/{any}’, function ($any) { // any other url, subfolders also })->where(‘any’, ‘.*’); Lumen 5 This is for Lumen instead: $app->get(‘/admin’, function () use ($app) { // }); $app->get(‘/{any:.*}’, function ($any) use ($app) { // });

My Routes are Returning a 404, How can I Fix Them?

On my Ubuntu LAMP installation, I solved this problem with the following 2 changes. Enable mod_rewrite on the apache server: sudo a2enmod rewrite. Edit /etc/apache2/apache2.conf, changing the “AllowOverride” directive for the /var/www directory (which is my main document root): AllowOverride All Then restart the Apache server: service apache2 restart

How to set every row to the same value with Laravel’s Eloquent/Fluent?

Just to keep this thread current, you can update all rows against an Eloquent model directly using: Model::query()->update([‘confirmed’ => 1]); If you are using something like WHERE Model::where(‘foo’, ‘=’, ‘bar’)->update([‘confirmed’ => 1]) If you want to include soft deleted rows as well Model::query()->withTrashed()->update([‘confirmed’ => 1]);