Skip to content

Instantly share code, notes, and snippets.

@vicgonvt
Last active September 4, 2019 00:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vicgonvt/dc1d424e34c866c2544e1296206eb594 to your computer and use it in GitHub Desktop.
Save vicgonvt/dc1d424e34c866c2544e1296206eb594 to your computer and use it in GitHub Desktop.
title keywords description date tags permalink img author authorlink
Macroable Laravel Classes (Full List)
laravel, coderstape, coder's tape, macros
The macro trait allows you to add functionality to many Laravel classes. Here's a list of all of them.
AUg 30, 2019
laravel, php
macroable-laravel-classes-full-list
Victor Gonzalez

Video

For the full explanation on how to use macros in Laravel, check out this full lesson on our YouTube channel.

Image of the lessons video for Laravel macros

Full List

The following list are all of the Laravel classes that currently use the Macroable trait and accept macro calls.

  • Illuminate\Auth\RequestGuard
  • Illuminate\Auth\SessionGuard
  • Illuminate\Cache\Repository
  • Illuminate\Console\Command
  • Illuminate\Console\Scheduling\Event
  • Illuminate\Cookie\CookieJar
  • Illuminate\Database\Eloquent\FactoryBuilder
  • Illuminate\Database\Eloquent\Relations\Relation
  • Illuminate\Database\Grammar
  • Illuminate\Database\Query\Builder
  • Illuminate\Database\Schema\Blueprint
  • Illuminate\Filesystem\Filesystem
  • Illuminate\Foundation\Testing\TestResponse
  • Illuminate\Http\JsonResponse
  • Illuminate\Http\RedirectResponse
  • Illuminate\Http\Request
  • Illuminate\Http\Response
  • Illuminate\Http\UploadedFile
  • Illuminate\Mail\Mailer
  • Illuminate\Routing\PendingResourceRegistration
  • Illuminate\Routing\Redirector
  • Illuminate\Routing\ResponseFactory
  • Illuminate\Routing\Route
  • Illuminate\Routing\Router
  • Illuminate\Routing\UrlGenerator
  • Illuminate\Support\Arr
  • Illuminate\Support\Collection
  • Illuminate\Support\LazyCollection
  • Illuminate\Support\Str
  • Illuminate\Support\Testing\Fakes\NotificationFake
  • Illuminate\Translation\Translator
  • Illuminate\Validation\Rule
  • Illuminate\View\Factory
  • Illuminate\View\View
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment