fix redirect routes on edit - #1
This commit is contained in:
parent
92aa299d4b
commit
4b61ab3b28
5 changed files with 11 additions and 11 deletions
|
|
@ -84,7 +84,7 @@ class BrandController extends Controller
|
|||
$brand->fill($request->validated());
|
||||
|
||||
if ($brand->saveOrFail()) {
|
||||
return redirect()->route('bo.brand.edit', $brand)
|
||||
return redirect()->route('bo.brands.edit', $brand)
|
||||
->with('success', __('crud.messages.has_been_created', [
|
||||
'model' => Str::ucfirst(\trans_choice('models.classes.brand', 1))
|
||||
]));
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ class FontController extends Controller
|
|||
$font->fill($request->validated());
|
||||
|
||||
if ($font->saveOrFail()) {
|
||||
return redirect()->route('bo.font.edit', $font)
|
||||
return redirect()->route('bo.fonts.edit', $font)
|
||||
->with('success', __('crud.messages.has_been_created', [
|
||||
'model' => Str::ucfirst(\trans_choice('models.classes.font', 1))
|
||||
]));
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ class ProductController extends Controller
|
|||
$product->fill($request->validated());
|
||||
|
||||
if ($product->saveOrFail()) {
|
||||
return redirect()->route('bo.product.edit', $product)
|
||||
return redirect()->route('bo.products.edit', $product)
|
||||
->with('success', __('crud.messages.has_been_created', [
|
||||
'model' => Str::ucfirst(\trans_choice('models.classes.product', 1))
|
||||
]));
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ class RangeController extends Controller
|
|||
$range->fill($request->validated());
|
||||
|
||||
if ($range->saveOrFail()) {
|
||||
return redirect()->route('bo.range.edit', $range)
|
||||
return redirect()->route('bo.ranges.edit', $range)
|
||||
->with('success', __('crud.messages.has_been_created', [
|
||||
'model' => Str::ucfirst(\trans_choice('models.classes.range', 1))
|
||||
]));
|
||||
|
|
|
|||
|
|
@ -26,15 +26,15 @@ Breadcrumbs::for('bo.users.edit', function (Generator $trail, User $user) {
|
|||
$trail->parent('bo.users.index');
|
||||
$trail->push(Str::ucfirst(trans('crud.actions.edit')), route('bo.users.edit', $user));
|
||||
});
|
||||
Breadcrumbs::for('bo.users.duplicate', function (Generator $trail, User $user) {
|
||||
Breadcrumbs::for('bo.users.duplicate', function (Generator $trail) {
|
||||
$trail->parent('bo.users.index');
|
||||
$trail->push(Str::ucfirst(trans('crud.actions.duplicate')), route('bo.users.duplicate', $user));
|
||||
$trail->push(Str::ucfirst(trans('crud.actions.duplicate')));
|
||||
});
|
||||
|
||||
// * ACTIVITY_LOGS
|
||||
Breadcrumbs::for('bo.activity_logs.index', function (Generator $trail) {
|
||||
$trail->push(
|
||||
Str::ucfirst(trans_choice('models.classes.activity_log', '*')),
|
||||
Str::ucfirst(trans_choice('models.classes.activity_log', 2)),
|
||||
route('bo.activity_logs.index', ['sort_col' => 'created_at', 'sort_way' => 'desc'])
|
||||
);
|
||||
});
|
||||
|
|
@ -46,7 +46,7 @@ Breadcrumbs::for('bo.activity_logs.show', function (Generator $trail, ActivityLo
|
|||
// * BRANDS
|
||||
Breadcrumbs::for('bo.brands.index', function (Generator $trail) {
|
||||
$trail->push(
|
||||
Str::of(trans_choice('models.classes.brand', '*'))->ucfirst(),
|
||||
Str::of(trans_choice('models.classes.brand', 2))->ucfirst(),
|
||||
route('bo.brands.index', ['sort_col' => 'updated_at', 'sort_way' => 'desc'])
|
||||
);
|
||||
});
|
||||
|
|
@ -62,7 +62,7 @@ Breadcrumbs::for('bo.brands.edit', function (Generator $trail, Brand $brand) {
|
|||
// * FONTS
|
||||
Breadcrumbs::for('bo.fonts.index', function (Generator $trail) {
|
||||
$trail->push(
|
||||
Str::of(trans_choice('models.classes.font', '*'))->ucfirst(),
|
||||
Str::of(trans_choice('models.classes.font', 2))->ucfirst(),
|
||||
route('bo.fonts.index', ['sort_col' => 'updated_at', 'sort_way' => 'desc'])
|
||||
);
|
||||
});
|
||||
|
|
@ -78,7 +78,7 @@ Breadcrumbs::for('bo.fonts.edit', function (Generator $trail, Font $font) {
|
|||
// * RANGES
|
||||
Breadcrumbs::for('bo.ranges.index', function (Generator $trail) {
|
||||
$trail->push(
|
||||
Str::of(trans_choice('models.classes.range', '*'))->ucfirst(),
|
||||
Str::of(trans_choice('models.classes.range', 2))->ucfirst(),
|
||||
route('bo.ranges.index', ['sort_col' => 'updated_at', 'sort_way' => 'desc'])
|
||||
);
|
||||
});
|
||||
|
|
@ -94,7 +94,7 @@ Breadcrumbs::for('bo.ranges.edit', function (Generator $trail, Range $range) {
|
|||
// * PRODUCTS
|
||||
Breadcrumbs::for('bo.products.index', function (Generator $trail) {
|
||||
$trail->push(
|
||||
Str::of(trans_choice('models.classes.product', '*'))->ucfirst(),
|
||||
Str::of(trans_choice('models.classes.product', 2))->ucfirst(),
|
||||
route('bo.products.index', ['sort_col' => 'updated_at', 'sort_way' => 'desc'])
|
||||
);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue