forked from aslan/applicant-site
prodV1 #2
|
@ -33,7 +33,6 @@ class DirectionProfileController extends Controller
|
|||
$directionProfile->description = $validated['description'];
|
||||
$directionProfile->slug = $validated['slug'];
|
||||
$directionProfile->position = $validated['position'];
|
||||
$directionProfile->direction_id = $validated['direction_id'];
|
||||
$directionProfile->save();
|
||||
|
||||
return redirect()->route('direction_profiles.index');
|
||||
|
@ -61,7 +60,6 @@ class DirectionProfileController extends Controller
|
|||
$directionProfile->description = $validated['description'];
|
||||
$directionProfile->slug = $validated['slug'];
|
||||
$directionProfile->position = $validated['position'];
|
||||
$directionProfile->direction_id = $validated['direction_id'];
|
||||
$directionProfile->save();
|
||||
|
||||
return redirect()->route('direction_profiles.index');
|
||||
|
@ -69,6 +67,9 @@ class DirectionProfileController extends Controller
|
|||
|
||||
public function destroy(DirectionProfile $directionProfile): RedirectResponse
|
||||
{
|
||||
if ($directionProfile->direction()->exists()) {
|
||||
return back();
|
||||
}
|
||||
$directionProfile->delete();
|
||||
return redirect()->route('direction_profiles.index');
|
||||
}
|
||||
|
|
|
@ -8,9 +8,6 @@ use Illuminate\Database\Seeder;
|
|||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Seed the application's database.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
User::factory()->create([
|
||||
|
|
Loading…
Reference in New Issue