fix slug store in Educational Institution

This commit is contained in:
aslan 2024-03-13 11:28:12 +03:00
parent f3c98e1548
commit ec57a7bd02
1 changed files with 4 additions and 1 deletions

View File

@ -2,6 +2,7 @@
namespace App\Http\Controllers\admin\Catalog;
use App\Helpers\SlugHelper;
use App\Http\Controllers\Controller;
use App\Http\Requests\admin\Catalog\StoreEducationalInstitutionRequest;
use App\Http\Requests\admin\Catalog\UpdateEducationalInstitutionRequest;
@ -29,10 +30,12 @@ class EducationalInstitutionController extends Controller
{
$validated = $request->validated();
$slug = SlugHelper::get($validated);
$educationalInstitution = new EducationalInstitution();
$educationalInstitution->name = $validated['name'];
$educationalInstitution->description = $validated['description'];
$educationalInstitution->slug = $validated['slug'];
$educationalInstitution->slug = $slug;
$educationalInstitution->position = $validated['position'];
$educationalInstitution->save();