the Scribe config file Prerequisite PHP 8.1 or higher Laravel 9 or higher composer require knuckleswtf/scribe php artisan vendor:publish --tag=scribe-config 8 Laravel Live Japan 2026
2. Run the document generation command php artisan scribe:generate . Access /docs after the command finishes. Route::get('/sample', [SampleController::class, 'sample']); Laravel Live Japan 2026 9
automatically. add items to the only parameter to specify which endpoints Scribe should call remove the only parameter to allow Scribe to call all endpoints 2. Run the document generation command php artisan scribe:generate . 'responses' => configureStrategy( Defaults::RESPONSES_STRATEGIES, Strategies\Responses\ResponseCalls::withSettings( only: ['GET *'], config: ['app.debug' => false], ), ), Laravel Live Japan 2026 12
automatically. add items to the only parameter to specify which endpoints Scribe should call remove the only parameter to allow Scribe to call all endpoints 2. Run the document generation command php artisan scribe:generate . only: ['GET *'], 'responses' => configureStrategy( Defaults::RESPONSES_STRATEGIES, Strategies\Responses\ResponseCalls::withSettings( config: ['app.debug' => false], ), ), Laravel Live Japan 2026 12
automatically. add items to the only parameter to specify which endpoints Scribe should call remove the only parameter to allow Scribe to call all endpoints 2. Run the document generation command php artisan scribe:generate . only: ['GET *', 'POST *'], 'responses' => configureStrategy( Defaults::RESPONSES_STRATEGIES, Strategies\Responses\ResponseCalls::withSettings( config: ['app.debug' => false], ), ), Laravel Live Japan 2026 12
automatically. add items to the only parameter to specify which endpoints Scribe should call remove the only parameter to allow Scribe to call all endpoints 2. Run the document generation command php artisan scribe:generate . 'responses' => configureStrategy( Defaults::RESPONSES_STRATEGIES, Strategies\Responses\ResponseCalls::withSettings( config: ['app.debug' => false], ), ), Laravel Live Japan 2026 12
#[UrlParam()] : Add details for a URL parameter #[QueryParam()] , #[BodyParam()] : Add query and body parameter details #[ResponseFromApiResource()] : Generate a response example from ApiResource and more… public function find(int $id): SampleMessageResource { $message = SampleMessage::findOrFail($id); return new SampleMessageResource($message); } Laravel Live Japan 2026 14
#[UrlParam()] : Add details for a URL parameter #[QueryParam()] , #[BodyParam()] : Add query and body parameter details #[ResponseFromApiResource()] : Generate a response example from ApiResource and more… #[Endpoint('Find The Sample Message', 'Return the sample message.')] public function find(int $id): SampleMessageResource { $message = SampleMessage::findOrFail($id); return new SampleMessageResource($message); } Laravel Live Japan 2026 14
#[UrlParam()] : Add details for a URL parameter #[QueryParam()] , #[BodyParam()] : Add query and body parameter details #[ResponseFromApiResource()] : Generate a response example from ApiResource and more… #[UrlParam('id', 'integer', 'The ID of the message.')] public function find(int $id): SampleMessageResource #[Endpoint('Find The Sample Message', 'Return the sample message.')] { $message = SampleMessage::findOrFail($id); return new SampleMessageResource($message); } Laravel Live Japan 2026 14
#[UrlParam()] : Add details for a URL parameter #[QueryParam()] , #[BodyParam()] : Add query and body parameter details #[ResponseFromApiResource()] : Generate a response example from ApiResource and more… #[ResponseFromApiResource(SampleMessageResource::class, SampleMessage::class)] return new SampleMessageResource($message); #[Endpoint('Find The Sample Message', 'Return the sample message.')] #[UrlParam('id', 'integer', 'The ID of the message.')] public function find(int $id): SampleMessageResource { $message = SampleMessage::findOrFail($id); } Laravel Live Japan 2026 14
#[UrlParam()] : Add details for a URL parameter #[QueryParam()] , #[BodyParam()] : Add query and body parameter details #[ResponseFromApiResource()] : Generate a response example from ApiResource and more… #[Endpoint('Find The Sample Message', 'Return the sample message.')] #[UrlParam('id', 'integer', 'The ID of the message.')] #[ResponseFromApiResource(SampleMessageResource::class, SampleMessage::class)] public function find(int $id): SampleMessageResource { $message = SampleMessage::findOrFail($id); return new SampleMessageResource($message); } Laravel Live Japan 2026 14