As developers, we often map business processes to digital processes, from sending an email to something quite complex. Mapping Business Process in Laravel 👀

class PlaceOrderController { public function __construct( private readonly FirstOrCreateCustomer $action, ) {} public function __invoke(PlaceOrderRequest $request): RedirectResponse { // Create our customer record. $customer = $this->action->handle([]); dispatch(new PlaceOrder($customer, $request)); Session::put('status', 'Your order is being processed.'); return redirect()->back(); }}

class PlaceOrder implements ShouldQueue { use Dispatchable; use InteractsWithQueue; use Queueable; use SerializesModels; public function _construct( public readonly Customer $customer, public readonly Request $request, ) {} public function handle(): void { // Create an order for our customer.

Using this approach, we can break down our business processes that aren’t digital and make digital representations of them.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners