Fix the route() calls for L6
This commit is contained in:
@@ -3,11 +3,9 @@
|
||||
namespace App\Contracts;
|
||||
|
||||
use Illuminate\Validation\Validator;
|
||||
use Prettus\Repository\Eloquent\BaseRepository;
|
||||
|
||||
/**
|
||||
* Class Repository
|
||||
*/
|
||||
abstract class Repository extends \Prettus\Repository\Eloquent\BaseRepository
|
||||
abstract class Repository extends BaseRepository
|
||||
{
|
||||
/**
|
||||
* @param $id
|
||||
@@ -20,7 +18,7 @@ abstract class Repository extends \Prettus\Repository\Eloquent\BaseRepository
|
||||
try {
|
||||
return $this->find($id, $columns);
|
||||
} catch (\Exception $e) {
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ class AircraftController extends Controller
|
||||
$aircraft = $this->aircraftRepo->create($attrs);
|
||||
|
||||
Flash::success('Aircraft saved successfully.');
|
||||
return redirect(route('admin.aircraft.edit', ['id' => $aircraft->id]));
|
||||
return redirect(route('admin.aircraft.edit', [$aircraft->id]));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -107,7 +107,7 @@ class RankController extends Controller
|
||||
|
||||
Cache::forget(config('cache.keys.RANKS_PILOT_LIST.key'));
|
||||
|
||||
return redirect(route('admin.ranks.edit', ['id' => $model->id]));
|
||||
return redirect(route('admin.ranks.edit', [$model->id]));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -155,7 +155,7 @@ class SubfleetController extends Controller
|
||||
$subfleet = $this->subfleetRepo->create($input);
|
||||
|
||||
Flash::success('Subfleet saved successfully.');
|
||||
return redirect(route('admin.subfleets.edit', ['id' => $subfleet->id]));
|
||||
return redirect(route('admin.subfleets.edit', [$subfleet->id]));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -299,6 +299,6 @@ class UserController extends Controller
|
||||
|
||||
flash('New API key generated!')->success();
|
||||
|
||||
return redirect(route('admin.users.edit', ['id' => $id]));
|
||||
return redirect(route('admin.users.edit', [$id]));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -335,7 +335,7 @@ class PirepController extends Controller
|
||||
Flash::success('PIREP submitted!');
|
||||
}
|
||||
|
||||
return redirect(route('frontend.pireps.show', ['id' => $pirep->id]));
|
||||
return redirect(route('frontend.pireps.show', [$pirep->id]));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -438,7 +438,7 @@ class PirepController extends Controller
|
||||
return redirect(route('frontend.pireps.index'));
|
||||
}
|
||||
|
||||
return redirect(route('frontend.pireps.show', ['id' => $pirep->id]));
|
||||
return redirect(route('frontend.pireps.show', [$pirep->id]));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -458,6 +458,6 @@ class PirepController extends Controller
|
||||
}
|
||||
|
||||
$this->pirepSvc->submit($pirep);
|
||||
return redirect(route('frontend.pireps.show', ['id' => $pirep->id]));
|
||||
return redirect(route('frontend.pireps.show', [$pirep->id]));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,6 +86,7 @@ class ProfileController extends Controller
|
||||
|
||||
/**
|
||||
* Show the edit for form the user's profile
|
||||
*
|
||||
* @param Request $request
|
||||
*
|
||||
* @throws \Exception
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
@if($pirep->state === PirepState::PENDING || $pirep->state === PirepState::REJECTED)
|
||||
{{ Form::open(['url' => route('admin.pirep.status', ['id' => $pirep->id]),
|
||||
{{ Form::open(['url' => route('admin.pirep.status', [$pirep->id]),
|
||||
'method' => 'post',
|
||||
'name' => 'accept_'.$pirep->id,
|
||||
'id' => $pirep->id.'_accept',
|
||||
@@ -16,7 +16,7 @@
|
||||
<td> </td>
|
||||
<td>
|
||||
@if($pirep->state === PirepState::PENDING || $pirep->state === PirepState::ACCEPTED)
|
||||
{{ Form::open(['url' => route('admin.pirep.status', ['id' => $pirep->id]),
|
||||
{{ Form::open(['url' => route('admin.pirep.status', [$pirep->id]),
|
||||
'method' => 'post',
|
||||
'name' => 'reject_'.$pirep->id,
|
||||
'id' => $pirep->id.'_reject',
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<table class="table table-hover">
|
||||
<tr>
|
||||
<td>Pilot</td>
|
||||
<td><a href="{{ route('admin.users.show', ['id' => $pirep->pilot->id]) }}"
|
||||
<td><a href="{{ route('admin.users.show', [$pirep->pilot->id]) }}"
|
||||
target="_blank">{{ $pirep->user->name }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
|
||||
<!-- Submit Field -->
|
||||
<div class="form-group col-sm-6 text-right">
|
||||
{{--<a href="{{ route('admin.users.regen_apikey', ['id' => $user->id]) }}" class="btn btn-warning"
|
||||
{{--<a href="{{ route('admin.users.regen_apikey', [$user->id]) }}" class="btn btn-warning"
|
||||
onclick="return confirm('Are you sure? This will reset this user\'s API key.')">new api key</a>--}}
|
||||
|
||||
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
{{--</div>--}}
|
||||
<div class="header header-primary text-center blue-bg">
|
||||
<h3 class="title title-up text-white">
|
||||
<a href="{{ route('frontend.profile.show', ['id' => $user->id]) }}" class="text-white">{{ $user->name }}</a>
|
||||
<a href="{{ route('frontend.profile.show', [$user->id]) }}" class="text-white">{{ $user->name }}</a>
|
||||
</h3>
|
||||
<div class="photo-container">
|
||||
@if ($user->avatar == null)
|
||||
@@ -37,7 +37,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer text-center">
|
||||
<a href="{{ route('frontend.profile.show', ['id' => $user->id]) }}" class="btn btn-neutral btn-sm">@lang('common.profile')</a>
|
||||
<a href="{{ route('frontend.profile.show', [$user->id]) }}" class="btn btn-neutral btn-sm">@lang('common.profile')</a>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p class="float-right">
|
||||
<a href="{{ route('frontend.pireps.edit', ['id' => $pirep->id]) }}" class="btn btn-sm btn-info">@lang('common.edit')</a>
|
||||
<a href="{{ route('frontend.pireps.edit', [$pirep->id]) }}" class="btn btn-sm btn-info">@lang('common.edit')</a>
|
||||
</p>
|
||||
<h5>
|
||||
<a href="{{ route('frontend.pireps.show', [$pirep->id]) }}">
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
{{$pirep->dpt_airport->location}}
|
||||
</h4>
|
||||
<p>
|
||||
<a href="{{route('frontend.airports.show', ['id' => $pirep->dpt_airport_id])}}">
|
||||
<a href="{{route('frontend.airports.show', $pirep->dpt_airport_id)}}">
|
||||
{{ $pirep->dpt_airport->full_name }} ({{ $pirep->dpt_airport_id }})</a>
|
||||
<br/>
|
||||
@if($pirep->block_off_time)
|
||||
@@ -35,7 +35,7 @@
|
||||
{{$pirep->arr_airport->location}}
|
||||
</h4>
|
||||
<p>
|
||||
<a href="{{route('frontend.airports.show', ['id' => $pirep->arr_airport_id])}}">
|
||||
<a href="{{route('frontend.airports.show', $pirep->arr_airport_id)}}">
|
||||
{{ $pirep->arr_airport->full_name }} ({{ $pirep->arr_airport_id }})</a>
|
||||
<br/>
|
||||
@if($pirep->block_on_time)
|
||||
@@ -77,14 +77,14 @@
|
||||
@if(!$pirep->read_only)
|
||||
<div class="float-right" style="margin-bottom: 10px;">
|
||||
<form method="get"
|
||||
action="{{ route('frontend.pireps.edit', ['id' => $pirep->id]) }}"
|
||||
action="{{ route('frontend.pireps.edit', $pirep->id) }}"
|
||||
style="display: inline">
|
||||
@csrf
|
||||
<button class="btn btn-info">@lang('common.edit')</button>
|
||||
</form>
|
||||
|
||||
<form method="post"
|
||||
action="{{ route('frontend.pireps.submit', ['id' => $pirep->id]) }}"
|
||||
action="{{ route('frontend.pireps.submit', $pirep->id) }}"
|
||||
style="display: inline">
|
||||
@csrf
|
||||
<button class="btn btn-success">@lang('common.submit')</button>
|
||||
|
||||
@@ -23,11 +23,11 @@
|
||||
</td>
|
||||
<td>
|
||||
@if($pirep->dpt_airport){{ $pirep->dpt_airport->name }}@endif
|
||||
(<a href="{{route('frontend.airports.show', ['id' => $pirep->dpt_airport_id])}}">{{$pirep->dpt_airport_id}}</a>)
|
||||
(<a href="{{route('frontend.airports.show', [$pirep->dpt_airport_id])}}">{{$pirep->dpt_airport_id}}</a>)
|
||||
</td>
|
||||
<td>
|
||||
@if($pirep->arr_airport){{ $pirep->arr_airport->name }}@endif
|
||||
(<a href="{{route('frontend.airports.show', ['id' => $pirep->arr_airport_id])}}">{{$pirep->arr_airport_id}}</a>)
|
||||
(<a href="{{route('frontend.airports.show', [$pirep->arr_airport_id])}}">{{$pirep->arr_airport_id}}</a>)
|
||||
</td>
|
||||
<td>
|
||||
@if($pirep->aircraft)
|
||||
@@ -58,9 +58,7 @@
|
||||
</td>
|
||||
<td>
|
||||
@if(!$pirep->read_only)
|
||||
<a href="{{ route('frontend.pireps.edit', [
|
||||
'id' => $pirep->id,
|
||||
]) }}">@lang('common.edit')</a>
|
||||
<a href="{{ route('frontend.pireps.edit', [$pirep->id]) }}">@lang('common.edit')</a>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
<a href="{{ route('frontend.profile.regen_apikey') }}" class="btn btn-warning"
|
||||
onclick="return confirm({{ __('Are you sure? This will reset your API key.') }})">@lang('profile.newapikey')</a>
|
||||
|
||||
<a href="{{ route('frontend.profile.edit', ['id' => $user->id]) }}"
|
||||
<a href="{{ route('frontend.profile.edit', [$user->id]) }}"
|
||||
class="btn btn-primary">@lang('common.edit')</a>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ route('frontend.profile.show.public', ['id' => $user->id]) }}">
|
||||
<a href="{{ route('frontend.profile.show.public', [$user->id]) }}">
|
||||
{{ $user->name }}
|
||||
</a>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user