diff --git a/app/Http/Controllers/ProjectController.php b/app/Http/Controllers/ProjectController.php new file mode 100644 index 0000000..ec70807 --- /dev/null +++ b/app/Http/Controllers/ProjectController.php @@ -0,0 +1,86 @@ + $projects]); + } + + /** + * Show the form for creating a new resource. + * + * @return \Illuminate\Http\Response + */ + public function create() + { + return view('projects.create'); + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function store(Request $request) + { + // + } + + /** + * Display the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function show($id) + { + // + } + + /** + * Show the form for editing the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function edit($id) + { + // + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(Request $request, $id) + { + // + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function destroy($id) + { + // + } +} diff --git a/app/Models/Project.php b/app/Models/Project.php new file mode 100644 index 0000000..dd9957e --- /dev/null +++ b/app/Models/Project.php @@ -0,0 +1,15 @@ +id(); + $table->string('name'); + $table->string('description'); + $table->timestamps(); + $table->softDeletes(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('projects'); + } +} diff --git a/resources/views/admin/users/list.blade.php b/resources/views/admin/users/list.blade.php index a70219a..6c29438 100644 --- a/resources/views/admin/users/list.blade.php +++ b/resources/views/admin/users/list.blade.php @@ -45,4 +45,4 @@ - \ No newline at end of file + diff --git a/resources/views/layouts/navigation.blade.php b/resources/views/layouts/navigation.blade.php index fc67673..0e9bfab 100644 --- a/resources/views/layouts/navigation.blade.php +++ b/resources/views/layouts/navigation.blade.php @@ -23,6 +23,11 @@ @endif + diff --git a/resources/views/projects/create.blade.php b/resources/views/projects/create.blade.php new file mode 100644 index 0000000..c3f1234 --- /dev/null +++ b/resources/views/projects/create.blade.php @@ -0,0 +1,60 @@ + + +

+ {{ __('Create user') }} +

+
+ +
+
+
+
+ +
+ @csrf + +
+ + + +
+ + +
+ + + +
+ + +
+ + + +
+ + +
+ + + +
+ + +
+ + + +
+ +
+ + {{ __('Register') }} + +
+
+
+
+
+
+
\ No newline at end of file diff --git a/resources/views/projects/edit.blade.php b/resources/views/projects/edit.blade.php new file mode 100644 index 0000000..06f4f7d --- /dev/null +++ b/resources/views/projects/edit.blade.php @@ -0,0 +1,54 @@ + + +

+ {{ __('Edit user') }} +

+
+ +
+
+
+
+ +
+ @csrf + @method('PUT') + + +
+ + + +
+ + +
+ + + +
+ + +
+ + + +
+ +
+ + + {{ __('Save') }} + + +
+
+
+
+
+
+
\ No newline at end of file diff --git a/resources/views/projects/list.blade.php b/resources/views/projects/list.blade.php new file mode 100644 index 0000000..95c9bea --- /dev/null +++ b/resources/views/projects/list.blade.php @@ -0,0 +1,47 @@ + + +

+ {{ __('Project list') }} +

+
+ +
+
+
+
+ + + {{__('Create project')}} + + +
+ + + + + + + @forelse ( $projects as $project) + + + + + + @empty + + + + @endforelse +
+ {{ __('Title')}} + + {{ __('Comment')}} + + {{ __('Actions')}} +
{{ $project->name }}{{ $project->description }} 
No Projects!
+
+
+
+
+
+
\ No newline at end of file diff --git a/resources/views/projects/show.blade.php b/resources/views/projects/show.blade.php new file mode 100644 index 0000000..3f6eb00 --- /dev/null +++ b/resources/views/projects/show.blade.php @@ -0,0 +1,53 @@ + + +

+ {{ __('Show user') }} +

+
+ +
+
+
+
+ + + + +
+ + + +
+ + +
+ + + +
+ + +
+ + + +
+ + + +
+
+
+
+
\ No newline at end of file diff --git a/routes/web.php b/routes/web.php index 794aa7e..84ff19c 100644 --- a/routes/web.php +++ b/routes/web.php @@ -2,6 +2,7 @@ use Illuminate\Support\Facades\Route; use App\Http\Controllers\UserController; +use App\Http\Controllers\ProjectController; /* |-------------------------------------------------------------------------- @@ -22,15 +23,13 @@ Route::get('/dashboard', function () { return view('dashboard'); })->middleware(['auth'])->name('dashboard'); -// Route::resource('/users', UserController::class)->middleware(['auth']); +// Users Route::prefix('admin')->middleware(['admin'])->group(function () { Route::resource('/users', UserController::class); }); -// Route::prefix('admin')->group(function () { -// Route::resource('/users', UserController::class); -// }); - +// Projects +Route::resource('/projects', ProjectController::class)->middleware(['auth']); require __DIR__ . '/auth.php';