<commit_before><?php

use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\View;
use Orchestra\Support\Facades\Asset;
use Orchestra\Support\Facades\Widget;

Event::listen('orchestra.ready: admin', 'Orchestra\Story\Services\Event\DashboardHandler@onDashboardView');
Event::listen('orchestra.form: extension.orchestra/story', 'Orchestra\Story\Services\Event\ExtensionHandler@onFormView');
Event::listen('orchestra.form: extension.orchestra/story', function ()
{
	$placeholder = Widget::make('placeholder.orchestra.extensions');
	$placeholder->add('permalink')->value(View::make('orchestra/story::widgets.help'));
});

Event::listen('orchestra.validate: extension.orchestra/story', function (& $rules)
{
	$rules['page_permalink'] = array('required');
});

Event::listen('orchestra.story.editor: markdown', function ()
{
	$asset = Asset::container('orchestra/foundation::footer');
	$asset->script('editor', 'packages/orchestra/story/vendor/editor/editor.js');
	$asset->style('editor', 'packages/orchestra/story/vendor/editor/editor.css');
	$asset->script('storycms', 'packages/orchestra/story/js/storycms.min.js');
	$asset->script('storycms.md', 'packages/orchestra/story/js/storycms.markdown.min.js', array('editor'));
});
<commit_msg>Add validation for configuring story.<commit_after><?php

use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\View;
use Orchestra\Support\Facades\Asset;
use Orchestra\Support\Facades\Widget;

Event::listen('orchestra.ready: admin', 'Orchestra\Story\Services\Event\DashboardHandler@onDashboardView');
Event::listen('orchestra.form: extension.orchestra/story', 'Orchestra\Story\Services\Event\ExtensionHandler@onFormView');
Event::listen('orchestra.form: extension.orchestra/story', function ()
{
	$placeholder = Widget::make('placeholder.orchestra.extensions');
	$placeholder->add('permalink')->value(View::make('orchestra/story::widgets.help'));
});

Event::listen('orchestra.validate: extension.orchestra/story', function (& $rules)
{
	$rules['page_permalink'] = array('required');
	$rules['post_permalink'] = array('required');
});

Event::listen('orchestra.story.editor: markdown', function ()
{
	$asset = Asset::container('orchestra/foundation::footer');
	$asset->script('editor', 'packages/orchestra/story/vendor/editor/editor.js');
	$asset->style('editor', 'packages/orchestra/story/vendor/editor/editor.css');
	$asset->script('storycms', 'packages/orchestra/story/js/storycms.min.js');
	$asset->script('storycms.md', 'packages/orchestra/story/js/storycms.markdown.min.js', array('editor'));
});

{'fraction_non_alphanumeric': 0.18932606155044798, 'fraction_numerical': 0.0, 'mean_word_length': 8.237410071942445, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5774034', 'n_tokens_mistral': 800, 'n_tokens_neox': 831, 'n_words': 88}