prodV1 #2

Open
RomanGolienko wants to merge 309 commits from prodV1 into main
1 changed files with 4 additions and 1 deletions
Showing only changes of commit ec57a7bd02 - Show all commits

View File

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