Showing 10 of 2,142 results.

Laravel Application Helper Function: event

event($event, $payload = [], $halt = false) The event helper is a convenient way to dispatch a particular $event to its listeners. An optional $payload of data can also be supplied when dispatching the event. When the event is dispatched, all its...

Laravel Collection Public API: take

take($limit) The take method is a useful method that will return a number of items (up to the provided $limit ) from the collection. If the $limit is negative, it will return a number of items (up to the provided $limit ) from the end of the...

Introduction & Installation

Social Media Image Kit is a Statamic 4 addon that provides a framework for easily generating social media images for your site's content. Images are created by rendering Antlers or Blade templates and converting the results to an image. Generated...

Laravel Application Helper: app_path

app_path($path = '') The app_path will return the full path to the Laravel application directory (which is named app by default). The exact value returned by calling app_path is dependent on the specific folder structure where the application is...

Laravel Application Helper Function: dispatch

dispatch($command) The dispatch helper function can be used to push a new job onto the job queue (or dispatch the job). The function resolves the configured Illuminate\Contracts\Bus\Dispatcher implementation from the Service Container and then...

Configurable Composer Manager | The Statamic Add-on Roundup

The ConfigurableComposerManager add-on simply allows developers to make configuration changes to the Composer executable that Statamic internally uses to manage add-on updates. This also allowed me to specify a custom Composer installation...

Laravel Application Helper Function: abort

abort($code, $message = '', array $headers = []) The abort function will throw an instance of Symfony\Component\HttpKernel\Exception\HttpException with the given $code , $message and any $headers supplied. These exceptions can be caught and...

Laravel Router Helper Function: put

put($uri, $action) The put function is a shortcut to registering a route with the router that responds to the PUT HTTP verb. The $uri is the URI of the route, such as / or login . The $action is what will be executed by the router when the route...

Laravel Router Helper Function: post

post($uri, $action) The post function is a shortcut to registering a route with the router that responds to the POST HTTP verb. The $uri is the URI of the route, such as / or login . The $action is what will be executed by the router when the...