Skip to content

Commit

Permalink
Merge pull request #48 from aaron-muti-420/main
Browse files Browse the repository at this point in the history
Skills section
  • Loading branch information
hpmouton authored Apr 11, 2024
2 parents 36e0c04 + af53686 commit e383b06
Show file tree
Hide file tree
Showing 3 changed files with 1,044 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/Http/Controllers/System/SkillController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace App\Http\Controllers\System;

use App\Http\Controllers\Controller;
use App\Models\Audit\category;
use App\Models\Audit\skill;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Crypt;
Expand Down Expand Up @@ -69,8 +70,11 @@ public function edit(string $id)
{
//
$skill = skill::findOrFail($id);
$categories = category::all();

return view('directories.skills.edit', compact('skill', 'categories'));


return view('directories.skills.edit', compact('skill'));
}

/**
Expand Down
12 changes: 12 additions & 0 deletions resources/views/directories/skills/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@
<label for="skill_description" class="block text-sm font-medium text-gray-700">Skill Description</label>
<textarea name="skill_description" id="skill_description" class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-500 rounded-md text-lg h-40">{{ $skill->skill_description }}</textarea>
</div>
<div class="mb-4 w-70">
<label for="category" class="block text-sm font-medium text-gray-700">Category</label>
<select name="category" id="category" class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md text-lg">
@forelse ($categories as $category)
<option value="{{ $category->id }}" {{ $skill->category_id === $category->id ? 'selected' : '' }}>
{{ $category->category_title }}
</option>
@empty
<option value="" disabled>No categories found</option>
@endforelse
</select>
</div>

<div class="mt-4 flex justify-center">
<button type="submit" class="inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 text-lg">
Expand Down
Loading

0 comments on commit e383b06

Please sign in to comment.