diff --git a/config/app.php b/config/app.php index 11d4fa1d..3da2dbcf 100644 --- a/config/app.php +++ b/config/app.php @@ -12,8 +12,6 @@ return [ 'aliases' => Facade::defaultAliases()->merge([ 'EnhancedApps' => App\EnhancedApps::class, - 'Form' => Collective\Html\FormFacade::class, - 'Html' => Collective\Html\HtmlFacade::class, 'Redis' => Illuminate\Support\Facades\Redis::class, 'SupportedApps' => App\SupportedApps::class, 'Yaml' => Symfony\Component\Yaml\Yaml::class, diff --git a/resources/views/items/create.blade.php b/resources/views/items/create.blade.php index 4b0ff6cd..eab34c26 100644 --- a/resources/views/items/create.blade.php +++ b/resources/views/items/create.blade.php @@ -2,9 +2,9 @@ @section('content') - {!! Form::open(array('route' => 'items.store', 'id' => 'itemform', 'files' => true, 'method'=>'POST')) !!} + {{ html()->form('POST', route('items.store'))->id('itemform')->acceptsFiles()->open() }} @include('items.form') - {!! Form::close() !!} + {{ html()->form()->close() }} @endsection @section('scripts') diff --git a/resources/views/items/edit.blade.php b/resources/views/items/edit.blade.php index 46d49722..12a8d286 100644 --- a/resources/views/items/edit.blade.php +++ b/resources/views/items/edit.blade.php @@ -2,9 +2,9 @@ @section('content') - {!! Form::model($item, ['data-item-id' =>$item->id, 'method' => 'PATCH', 'id' => 'itemform', 'files' => true, 'route' => ['items.update', $item->id]]) !!} + {{ html()->modelForm($item, 'PATCH', route('items.update', $item->id))->data('item-id', $item->id)->id('itemform')->acceptsFiles()->open() }} @include('items.form') - {!! Form::close() !!} + {{ html()->closeModelForm() }} @endsection @section('scripts') diff --git a/resources/views/items/enable.blade.php b/resources/views/items/enable.blade.php index dac9d6ee..8a4c8bc8 100644 --- a/resources/views/items/enable.blade.php +++ b/resources/views/items/enable.blade.php @@ -1,6 +1,6 @@
- {!! Form::hidden('config[enabled]', '0') !!} + {{ html()->hidden('config[enabled]', '0') }}
@@ -38,7 +38,7 @@
- {!! Form::text('website', $item->url ?? null, array('placeholder' => __('app.apps.website'), 'id' => 'website', 'class' => 'form-control')) !!} + {{ html()->text('website', $item->url ?? null)->placeholder(__('app.apps.website'))->id('website')->class('form-control') }} Don't forget http(s)://
@@ -58,29 +58,29 @@ {!! csrf_field() !!}
- {!! Form::text('title', null, array('placeholder' => __('app.apps.title'), 'id' => 'appname', 'class' => 'form-control', 'required')) !!} + {{ html()->text('title')->placeholder(__('app.apps.title'))->id('appname')->class('form-control')->required() }}
- {!! Form::text('colour', $item->colour ?? '#161b1f', array('placeholder' => __('app.apps.hex'), 'id' => 'appcolour', 'class' => 'form-control color-picker set-bg-elem')) !!} + {{ html()->text('colour', $item->colour ?? '#161b1f')->placeholder(__('app.apps.hex'))->id('appcolour')->class('form-control color-picker set-bg-elem') }}
- {!! Form::text('url', $item->url ?? null, array('placeholder' => __('app.url'), 'id' => 'appurl', 'class' => 'form-control', 'required')) !!} + {{ html()->text('url', $item->url ?? null)->placeholder(__('app.url'))->id('appurl')->class('form-control')->required() }} Don't forget http(s)://
- {!! Form::select('tags[]', $tags, $current_tags, ['class' => 'tags', 'multiple']) !!} + {{ html()->multiselect('tags[]', $tags, $current_tags)->class('tags') }}
@if($app['config']->get('app.auth_roles_enable', false))
- {!! Form::text('role', $item->role ?? null, array('placeholder' => __('app.role'), 'id' => 'role', 'class' => 'form-control')) !!} + {{ html()->text('role', $item->role ?? null)->placeholder(__('app.role'))->id('role')->class('form-control') }}
@endif @@ -93,7 +93,7 @@ else $icon = old('icon'); ?> - {!! Form::hidden('icon', $icon, ['class' => 'form-control']) !!} + {{ html()->hidden('icon', $icon)->class('form-control') }} @else @endif diff --git a/resources/views/items/list.blade.php b/resources/views/items/list.blade.php index 162d981a..918d6eaa 100644 --- a/resources/views/items/list.blade.php +++ b/resources/views/items/list.blade.php @@ -37,9 +37,9 @@ {{ $app->getTagList() }} target }} href="{!! route('items.edit', [$app->id]) !!}" title="{{ __('app.settings.edit') }} {{ $app->title }}"> - {!! Form::open(['method' => 'DELETE','route' => ['items.destroy', $app->id],'style'=>'display:inline']) !!} + {{ html()->form('DELETE', route('items.destroy', $app->id))->style('display:inline')->open() }} - {!! Form::close() !!} + {{ html()->form()->close() }} @endforeach diff --git a/resources/views/items/trash.blade.php b/resources/views/items/trash.blade.php index 37e0f4d0..a2d3a0b3 100644 --- a/resources/views/items/trash.blade.php +++ b/resources/views/items/trash.blade.php @@ -28,10 +28,10 @@ {{ __('app.url') }} - {!! Form::open(['method' => 'DELETE','route' => ['items.destroy', $app->id],'style'=>'display:inline']) !!} + {{ html()->form('DELETE', route('items.destroy', $app->id))->style('display:inline')->open() }} - {!! Form::close() !!} + {{ html()->form()->close() }} @endforeach diff --git a/resources/views/settings/edit.blade.php b/resources/views/settings/edit.blade.php index 9170bd93..de28e4d2 100644 --- a/resources/views/settings/edit.blade.php +++ b/resources/views/settings/edit.blade.php @@ -2,8 +2,8 @@ @section('content') - {!! Form::model($setting, ['method' => 'PATCH', 'files' => true, 'route' => ['settings.edit', $setting->id]]) !!} + {{ html()->modelForm($setting, 'PATCH', route('settings.edit', $setting->id))->acceptsFiles()->open() }} @include('settings.form') - {!! Form::close() !!} + {{ html()->closeModelForm() }} @endsection \ No newline at end of file diff --git a/resources/views/tags/create.blade.php b/resources/views/tags/create.blade.php index 2e8a966b..b674f926 100644 --- a/resources/views/tags/create.blade.php +++ b/resources/views/tags/create.blade.php @@ -2,9 +2,9 @@ @section('content') - {!! Form::open(array('route' => 'tags.store', 'id' => 'itemform', 'files' => true, 'method'=>'POST')) !!} + {{ html()->form('POST', route('tags.store'))->id('itemform')->acceptsFiles()->open() }} @include('tags.form') - {!! Form::close() !!} + {{ html()->form()->close() }} @endsection @section('scripts') diff --git a/resources/views/tags/edit.blade.php b/resources/views/tags/edit.blade.php index 78a0e9db..d5974ad9 100644 --- a/resources/views/tags/edit.blade.php +++ b/resources/views/tags/edit.blade.php @@ -2,9 +2,9 @@ @section('content') - {!! Form::model($item, ['method' => 'PATCH', 'id' => 'itemform', 'files' => true, 'route' => ['tags.update', $item->id]]) !!} + {{ html()->modelForm($item, 'PATCH', route('tags.update', $item->id))->id('itemform')->acceptsFiles()->open() }} @include('tags.form') - {!! Form::close() !!} + {{ html()->closeModelForm() }} @endsection @section('scripts') diff --git a/resources/views/tags/form.blade.php b/resources/views/tags/form.blade.php index b6f7fa5e..ea0c9c93 100644 --- a/resources/views/tags/form.blade.php +++ b/resources/views/tags/form.blade.php @@ -12,10 +12,10 @@
- {!! Form::text('title', null, array('placeholder' => __('app.apps.title'), 'class' => 'form-control', 'required')) !!} + {{ html()->text('title')->placeholder(__('app.apps.title'))->class('form-control')->required() }}
- {!! Form::hidden('pinned', '0') !!} + {{ html()->hidden('pinned', '0') }}
- {!! Form::hidden('pinned', '0') !!} + {{ html()->hidden('pinned', '0') }}