Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support new inertia controller statement #718

Merged
merged 1 commit into from
Dec 18, 2024
Merged

Conversation

jasonmccreary
Copy link
Collaborator

@jasonmccreary jasonmccreary commented Dec 18, 2024

As Blueprint now generates Livewire components, it seemed fitting to introduce at least something for Inertia. This adds a new inertia controller statement to render a page with data.

controllers:
  Event:
    show:
      inertia: example.page with:event

Generates:

use Inertia\Inertia;
use Inertia\Response;

class EventController extends Controller
{
    public function show(Event $event): Response
    {
        return Inertia::render('Event/Show', [
            'event' => $event,
        ]);

    // ...
}

@jasonmccreary jasonmccreary merged commit da8dabd into master Dec 18, 2024
27 checks passed
@jasonmccreary jasonmccreary deleted the inertia-render branch December 18, 2024 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant