@extends('layouts.' . (request()->ajax() ? 'ajax' : 'app'), [ 'title' => trans('relations.create.title', ['name' => $model->name]), 'description' => '', 'breadcrumbs' => [ ['url' => route($parent . '.index'), 'label' => trans($parent . '.index.title')], ['url' => route($parent . '.show', $model->id), 'label' => $model->name], trans('crud.tabs.relations'), ] ]) @section('content')
@if ($ajax)

{{ __('relations.create.title', ['name' => $model->name]) }}

@endif
@include('cruds.forms._errors') {!! Form::open(['route' => [$route . '.store', $model->id], 'method' => 'POST', 'data-shortcut' => 1, 'id' => 'relation-form' ]) !!} @include('cruds.relations._form') {!! Form::hidden('owner_id', $model->entity->id) !!}
@if (!$ajax){!! trans('crud.or_cancel', ['url' => (!empty($cancel) ? $cancel : url()->previous() . (strpos(url()->previous(), '#relation') === false ? '#relation' : null))]) !!}@endif
{!! Form::close() !!}
@endsection