Skip to content

Commit

Permalink
Give data as a statamic values object to templates (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
BobWez98 authored Oct 3, 2022
1 parent 3000b90 commit 18ab816
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routes/fallback.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
use Statamic\Facades\Data;

if ($entry = Data::findByRequestUrl(request()->url())) {
if ($entry = Statamic\Facades\Entry::findByUri(request()->path())->toResponse(request())) {
if (View::exists($entry->get('template'))) {
echo view($entry->get('template'), $entry);
} else if (View::exists(str($entry->structure()->handle())->singular()->toString())) {
Expand Down

0 comments on commit 18ab816

Please sign in to comment.