Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .phpunit.cache/test-results

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion src/Http/Controllers/CP/Collections/EntriesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Illuminate\Validation\ValidationException;
use Statamic\Contracts\Entries\Entry as EntryContract;
use Statamic\CP\Breadcrumbs;
use Statamic\Events\EntryBlueprintFound;
use Statamic\Exceptions\BlueprintNotFoundException;
use Statamic\Facades\Action;
use Statamic\Facades\Asset;
Expand All @@ -21,10 +22,12 @@
use Statamic\Query\Scopes\Filters\Concerns\QueriesFilters;
use Statamic\Support\Arr;
use Statamic\Support\Str;
use Statamic\Support\Traits\Hookable;

class EntriesController extends CpController
{
use ExtractsFromEntryFields,
Hookable,
QueriesFilters;

public function index(FilteredRequest $request, $collection)
Expand Down Expand Up @@ -298,7 +301,11 @@ public function create(Request $request, $collection, $site)
$blueprint->ensureFieldHasConfig('author', ['visibility' => 'read_only']);
}

$values = Entry::make()->collection($collection)->values()->all();
$entry = Entry::make()->collection($collection);

$this->runHooks('creating-entry', $entry);

$values = $entry->values()->all();

if ($collection->hasStructure() && $request->parent) {
$values['parent'] = $request->parent;
Expand Down