Exporting large amounts of data in Laravel
An opinionated approach on how best to handle exporting large amounts of data in Laravel using commands and queues.
Ever wonder how some classes do not require a full namespace to be called in a blade view? i.e.
{{ Auth::id() }}
Instead of:
{{ \Illuminate\Support\Facades\Auth::id() }}
Laravel has a configuration file config/app.php
that maps class namespaces to an alias i.e.
// ...
/*
|--------------------------------------------------------------------------
| Class Aliases
|--------------------------------------------------------------------------
|
| This array of class aliases will be registered when this application
| is started. However, feel free to register as many as you wish as
| the aliases are "lazy" loaded so they don't hinder performance.
|
*/
'aliases' => [
'App' => Illuminate\Support\Facades\App::class,
'Arr' => Illuminate\Support\Arr::class,
'Artisan' => Illuminate\Support\Facades\Artisan::class,
'Auth' => Illuminate\Support\Facades\Auth::class,
// ...
],
An opinionated approach on how best to handle exporting large amounts of data in Laravel using commands and queues.
How to setup a Laravel Markdown editor and convert the markdown to HTML easy.
Discover efficient techniques for updating multiple rows with unique values in Laravel. Explore step-by-step instructions and practical examples to streamline your database operations.