forked from aslan/applicant-site
fix slug store in Educational Institution
This commit is contained in:
parent
f3c98e1548
commit
ec57a7bd02
|
@ -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();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue