Laravel 9 Update (#1413)

Update to Laravel 9 and PHP 8+

Co-authored-by: B.Fatih KOZ <fatih.koz@gmail.com>
This commit is contained in:
Nabeel S
2022-03-14 11:45:18 -04:00
committed by GitHub
parent 00bf18c225
commit 12848091a2
340 changed files with 6130 additions and 4502 deletions

View File

@@ -30,27 +30,28 @@
@endcomponent
</div>
</div>
<div class="row">
<div class="col-md-6">
{{--@include('admin.dashboard.pirep_chart')--}}
{{-- @include('admin.dashboard.pirep_chart') --}}
</div>
<div class="col-md-6">
{{-- Intentionally Left Blank --}}
</div>
</div>
<div class="row">
<div class="col-md-6">
{{-- Intentionally Left Blank --}}
</div>
<div class="col-md-6">
{{-- Intentionally Left Blank --}}
</div>
</div>
</div>
@endsection
@section('scripts')
@parent
<script>
$(document).ready(function () {
$(document).on('submit', 'form.pjax_news_form', function (event) {

View File

@@ -2,33 +2,33 @@
<div class="card border-blue-bottom">
@if($news->count() === 0)
<div class="text-center text-muted" style="padding: 30px;">
no news items
No news items
</div>
@endif
@foreach($news as $item)
<div class="content">
<div class="header">
<h4 class="title">{{ $item->subject }}</h4>
<p class="category">{{ $item->user->name }} - {{ show_datetime($item->created_at) }}</p>
<h5 class="title">
<b>{{ $item->subject }}</b>
</h5>
<div class="text-right">
{{ Form::open(['route' => 'admin.dashboard.news', 'method' => 'delete', 'class' => 'pjax_news_form']) }}
{{ Form::hidden('news_id', $item->id) }}
{{
Form::button('<i class="far fa-trash-alt"></i>&nbsp;delete', [
'type' => 'submit',
'class' => ' btn btn-danger btn-xs text-small',
'onclick' => "return confirm('Are you sure?')"
])
}}
{{ Form::close() }}
</div>
</div>
{{ $item->body }}
<div class="text-right">
{{ Form::open(['route' => 'admin.dashboard.news',
'method' => 'delete',
'class' => 'pjax_news_form',
]) }}
{{ Form::hidden('news_id', $item->id) }}
{{
Form::button('<i class="far fa-trash-alt"></i>&nbsp;delete',
['type' => 'submit',
'class' => ' btn btn-danger btn-xs text-small',
'onclick' => "return confirm('Are you sure?')"
])
}}
{{ Form::close() }}
<div class="body">
{!! $item->body !!}
</div>
<div class="footer text-right">
{{ $item->user->name }} - {{ show_datetime($item->created_at) }}
</div>
</div>
<hr/>
@@ -37,30 +37,28 @@
<div class="header">
<h4 class="title">Add News</h4>
</div>
{{ Form::open(['route' => 'admin.dashboard.news',
'method' => 'post',
'class' => 'pjax_news_form',
]) }}
{{ Form::open(['route' => 'admin.dashboard.news', 'method' => 'post', 'class' => 'pjax_news_form']) }}
<table class="table">
<tr>
<td>{{ Form::label('subject', 'Subject:') }}</td>
<td>{{ Form::text('subject', '', ['class' => 'form-control']) }}</td>
</tr>
<tr>
<td>{{ Form::label('body', 'Body:') }}</td>
<td>{{ Form::textarea('body', '', ['class' => 'form-control']) }}</td>
<td>{!! Form::textarea('body', '', ['id' => 'news_editor', 'class' => 'editor']) !!}</td>
</tr>
</table>
<div class="text-right">
{{
Form::button('<i class="fas fa-plus-circle"></i>&nbsp;add',
['type' => 'submit',
'class' => 'btn btn-success btn-s'])
}}
{{ Form::button('<i class="fas fa-plus-circle"></i>&nbsp;add', ['type' => 'submit', 'class' => 'btn btn-success btn-s']) }}
{{ Form::close() }}
</div>
</div>
</div>
</div>
@section('scripts')
@parent
<script src="{{ public_asset('assets/vendor/ckeditor4/ckeditor.js') }}"></script>
<script>
$(document).ready(function () { CKEDITOR.replace('news_editor'); });
</script>
@endsection

View File

@@ -205,6 +205,36 @@
</div>
</div>
<div class="row">
<div class="form-group col-sm-2">
{{ Form::label('distance', 'Distance:') }}
<div class="row">
<div class="col-sm-12">
{{ Form::number('distance', null, [
'class' => 'form-control',
'min' => 0,
'step' => '0.01'
]) }}
<p class="text-danger">{{ $errors->first('distance') }}</p>
</div>
</div>
</div>
<div class="form-group col-sm-2">
{{ Form::label('distance', 'Planned Distance:') }}
<div class="row">
<div class="col-sm-12">
{{ Form::number('planned_distance', null, [
'class' => 'form-control',
'min' => 0,
'step' => '0.01'
]) }}
<p class="text-danger">{{ $errors->first('planned_distance') }}</p>
</div>
</div>
</div>
</div>
<div class="row">
<!-- Route Field -->

View File

@@ -62,6 +62,10 @@
<td>Flight Level</td>
<td>{{ $pirep->level }}</td>
</tr>
<tr>
<td>Distance</td>
<td>{{ $pirep->distance }}</td>
</tr>
<tr>
<td>Route</td>
<td>{{ $pirep->route }}</td>