return redirect()->route('article.edit')->withInputs()->withErrors();
public function show($region, $category, $id){
$Region = Region::where('region_code', '=', $region)->first();
$Category = Category::where('cat_name', '=', $category)->first();
$Region->products()->where('good_region', $Region->id)->where('good_cat', '=', $Category->id)->where('id', '=', $id)->first();
return view(...)
}
status_history
- increment id
- integer status_id
- integer apply_id
- integer user_id
- string comment
- timestamps
applies
- increment id
- .....
- status_id
apply_statuses
- increment id
- string title
@if(Auth::check() && (Auth::user()->is_admin)
<p><a href="#" class="btn btn-success" role="button">Редактировать</a> <a href="#" class="btn btn-danger" role="button">Удалить</a></p>
@endif
public function photos(){
return $this->hasMany(Photo::class);
}
redirect()->with('success', '...')
@foreach($categories as $category)
<div class="slider-title clients-row">{{ $category['title'] }} <span class="plus">+</span></div>
<div class="slider-content">
<ul>
@foreach($category->clients as $client)
<li><span>{{ $client['title'] }}</span></li>
@endforeach
</ul>
</div>
@endforeach