|
Berdaq nomidagi qoraqalpoq davlat universiteti matematika fakulteti kompyuter ilmlari va dasturlash texnologiyalari bakalavr ta
|
bet | 11/13 | Sana | 18.05.2024 | Hajmi | 1,95 Mb. | | #242022 |
Bog'liq YARILKASINOV ASAN ONGARBAY ULISUBJECTS bosilsa,
18-rasm
19-rasm
Models/Subject.php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Subject extends Model
{
use HasFactory;
protected $guarded = [
'id'
];
}
Controllers/Subject Controller.php
namespace App\Http\Controllers;
use App\Models\Subject;
use App\Http\Requests\StoreSubjectRequest;
use App\Http\Requests\UpdateSubjectRequest;
class SubjectController extends Controller
{
public function index()
{
$subjects = Subject::get();
return view('admin.subjects', ['subjects' => $subjects]);
}
public function store(StoreSubjectRequest $request)
{
Subject::create($request->validated());
return back();
}
public function edit($id)
{
$subject = Subject::find($id);
return view('admin.subject_edit', ['subject' => $subject]);
}
public function update(UpdateSubjectRequest $request, $id)
{
Subject::find($id)->update($request->validated());
return redirect('subject');
}
public function destroy($id)
{
Subject::destroy($id);
return back(); } }
RESULTS bosilsa,
EVALUATION bosilsa,
20-rasm
EVALUATUION bosilsa,
21-rasm
EDIT bosilsa,
22-rasm
Models/Result.php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Result extends Model
{
use HasFactory;
protected $guarded = [
'id'
];
}
Controllers/ResultController.php
namespace App\Http\Controllers;
use App\Http\Requests\StoreAdminRequest;
use App\Models\Student;
use App\Http\Requests\StoreStudentRequest;
use App\Http\Requests\UpdateStudentRequest;
use App\Models\Result as ModelsResult;
use App\Models\Subject;
use GuzzleHttp\Psr7\Request;
use Illuminate\Http\Request as HttpRequest;
use LDAP\Result;
use PHPUnit\Framework\MockObject\Builder\Stub;
use function Symfony\Component\String\b;
class StudentController extends Controller
{
public function index()
|
|
Bosh sahifa
Aloqalar
Bosh sahifa
Berdaq nomidagi qoraqalpoq davlat universiteti matematika fakulteti kompyuter ilmlari va dasturlash texnologiyalari bakalavr ta
|