prodV1 #2

Open
RomanGolienko wants to merge 309 commits from prodV1 into main
2 changed files with 3 additions and 5 deletions
Showing only changes of commit 6ae42fafe8 - Show all commits

View File

@ -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');
}

View File

@ -8,9 +8,6 @@ use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
{
/**
* Seed the application's database.
*/
public function run(): void
{
User::factory()->create([