added developer guide area

master
A1Gard 2 days ago
parent 0ff404d8a6
commit 98e487cbc9

@ -247,4 +247,9 @@ class AreaController extends Controller
return redirect()->back()->with(['message' => __('Assets build failed')]);
}
}
public function guide(){
$areas = Area::all();
return view('admin.areas.area-guide', compact('areas'));
}
}

@ -0,0 +1,26 @@
@extends('layouts.app')
@section('title')
{{__("Design guide")}}
@endsection
@section('content')
@include('components.err')
<div class="container-fluid">
<ul class="list-group">
@foreach($areas as $area)
<li class="list-group-item">
<h4 class="float-start mx-4">
{{$area->name}}
</h4>
@foreach(json_decode($area->valid_segments) as $segment)
<span class="badge bg-primary mx-1 fs-6">
{{$segment}}
</span>
@endforeach
</li>
@endforeach
</ul>
</div>
@endsection

@ -27,4 +27,14 @@
</a>
</div>
</div>
<a class="action-btn circle-btn"
data-bs-toggle="tooltip"
data-bs-placement="top"
data-bs-custom-class="custom-tooltip"
data-bs-title="{{__("Developer guide")}}"
href="{{getRoute('guide')}}"
>
<i class="ri-code-line"></i>
</a>
@endsection

@ -362,6 +362,7 @@ Route::prefix(config('app.panel.prefix'))->name('admin.')->group(
Route::post('update/model/{model}/{id}', [\App\Http\Controllers\Admin\AreaController::class, "updateModel"])->name('update.model');
Route::get('sort/{area}', [\App\Http\Controllers\Admin\AreaController::class, "sort"])->name('sort');
Route::get('build', [\App\Http\Controllers\Admin\AreaController::class, "build"])->name('build');
Route::get('guide', [\App\Http\Controllers\Admin\AreaController::class, "guide"])->name('guide');
Route::post('sort-save/{area}', [\App\Http\Controllers\Admin\AreaController::class, "sortSave"])->name('sort-save');
}
);

Loading…
Cancel
Save