Skip to content

Commit

Permalink
updated web & api routes
Browse files Browse the repository at this point in the history
  • Loading branch information
Skuddin committed Sep 25, 2023
1 parent 7313d34 commit 5cb8f23
Show file tree
Hide file tree
Showing 141 changed files with 24 additions and 54 deletions.
Empty file modified .editorconfig
100644 → 100755
Empty file.
51 changes: 0 additions & 51 deletions .env.example

This file was deleted.

Empty file modified .gitattributes
100644 → 100755
Empty file.
Empty file modified .github/workflows/laravel.yml
100644 → 100755
Empty file.
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified .styleci.yml
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified app/Console/Kernel.php
100644 → 100755
Empty file.
Empty file modified app/Exceptions/Handler.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/Admin/DashboardController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/Admin/StatsController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/Api/V1/TaskController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/Auth/AuthenticatedSessionController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/Auth/ConfirmablePasswordController.php
100644 → 100755
Empty file.
Empty file.
Empty file modified app/Http/Controllers/Auth/EmailVerificationPromptController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/Auth/NewPasswordController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/Auth/PasswordResetLinkController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/Auth/RegisteredUserController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/Auth/VerifyEmailController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/Controller.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/DashboardController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/HomeController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/TaskController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/UserController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Kernel.php
100644 → 100755
Empty file.
Empty file modified app/Http/Middleware/Authenticate.php
100644 → 100755
Empty file.
Empty file modified app/Http/Middleware/EncryptCookies.php
100644 → 100755
Empty file.
Empty file modified app/Http/Middleware/IsAdminMiddleware.php
100644 → 100755
Empty file.
Empty file modified app/Http/Middleware/PreventRequestsDuringMaintenance.php
100644 → 100755
Empty file.
Empty file modified app/Http/Middleware/RedirectIfAuthenticated.php
100644 → 100755
Empty file.
Empty file modified app/Http/Middleware/TrimStrings.php
100644 → 100755
Empty file.
Empty file modified app/Http/Middleware/TrustHosts.php
100644 → 100755
Empty file.
Empty file modified app/Http/Middleware/TrustProxies.php
100644 → 100755
Empty file.
Empty file modified app/Http/Middleware/VerifyCsrfToken.php
100644 → 100755
Empty file.
Empty file modified app/Http/Requests/Auth/LoginRequest.php
100644 → 100755
Empty file.
Empty file modified app/Models/Task.php
100644 → 100755
Empty file.
Empty file modified app/Models/User.php
100644 → 100755
Empty file.
Empty file modified app/Providers/AppServiceProvider.php
100644 → 100755
Empty file.
Empty file modified app/Providers/AuthServiceProvider.php
100644 → 100755
Empty file.
Empty file modified app/Providers/BroadcastServiceProvider.php
100644 → 100755
Empty file.
Empty file modified app/Providers/EventServiceProvider.php
100644 → 100755
Empty file.
Empty file modified app/Providers/RouteServiceProvider.php
100644 → 100755
Empty file.
Empty file modified app/View/Components/AppLayout.php
100644 → 100755
Empty file.
Empty file modified app/View/Components/GuestLayout.php
100644 → 100755
Empty file.
Empty file modified bootstrap/app.php
100644 → 100755
Empty file.
Empty file modified bootstrap/cache/.gitignore
100644 → 100755
Empty file.
Empty file modified composer.json
100644 → 100755
Empty file.
Empty file modified composer.lock
100644 → 100755
Empty file.
Empty file modified config/app.php
100644 → 100755
Empty file.
Empty file modified config/auth.php
100644 → 100755
Empty file.
Empty file modified config/broadcasting.php
100644 → 100755
Empty file.
Empty file modified config/cache.php
100644 → 100755
Empty file.
Empty file modified config/cors.php
100644 → 100755
Empty file.
Empty file modified config/database.php
100644 → 100755
Empty file.
Empty file modified config/filesystems.php
100644 → 100755
Empty file.
Empty file modified config/hashing.php
100644 → 100755
Empty file.
Empty file modified config/logging.php
100644 → 100755
Empty file.
Empty file modified config/mail.php
100644 → 100755
Empty file.
Empty file modified config/queue.php
100644 → 100755
Empty file.
Empty file modified config/sanctum.php
100644 → 100755
Empty file.
Empty file modified config/services.php
100644 → 100755
Empty file.
Empty file modified config/session.php
100644 → 100755
Empty file.
Empty file modified config/view.php
100644 → 100755
Empty file.
Empty file modified database/.gitignore
100644 → 100755
Empty file.
Empty file modified database/factories/TaskFactory.php
100644 → 100755
Empty file.
Empty file modified database/factories/UserFactory.php
100644 → 100755
Empty file.
Empty file modified database/migrations/2014_10_12_000000_create_users_table.php
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified database/migrations/2021_10_16_152058_create_tasks_table.php
100644 → 100755
Empty file.
Empty file modified database/seeders/DatabaseSeeder.php
100644 → 100755
Empty file.
Empty file modified package-lock.json
100644 → 100755
Empty file.
Empty file modified package.json
100644 → 100755
Empty file.
Empty file modified phpunit.xml
100644 → 100755
Empty file.
Empty file modified public/.htaccess
100644 → 100755
Empty file.
Empty file modified public/css/app.css
100644 → 100755
Empty file.
Empty file modified public/favicon.ico
100644 → 100755
Empty file.
Empty file modified public/index.php
100644 → 100755
Empty file.
Empty file modified public/js/app.js
100644 → 100755
Empty file.
Empty file modified public/mix-manifest.json
100644 → 100755
Empty file.
Empty file modified public/robots.txt
100644 → 100755
Empty file.
Empty file modified public/web.config
100644 → 100755
Empty file.
Empty file modified resources/css/app.css
100644 → 100755
Empty file.
Empty file modified resources/js/app.js
100644 → 100755
Empty file.
Empty file modified resources/js/bootstrap.js
100644 → 100755
Empty file.
Empty file modified resources/lang/en/auth.php
100644 → 100755
Empty file.
Empty file modified resources/lang/en/pagination.php
100644 → 100755
Empty file.
Empty file modified resources/lang/en/passwords.php
100644 → 100755
Empty file.
Empty file modified resources/lang/en/validation.php
100644 → 100755
Empty file.
Empty file modified resources/views/admin/dashboard.blade.php
100644 → 100755
Empty file.
Empty file modified resources/views/admin/stats.blade.php
100644 → 100755
Empty file.
Empty file modified resources/views/auth/confirm-password.blade.php
100644 → 100755
Empty file.
Empty file modified resources/views/auth/forgot-password.blade.php
100644 → 100755
Empty file.
Empty file modified resources/views/auth/login.blade.php
100644 → 100755
Empty file.
Empty file modified resources/views/auth/register.blade.php
100644 → 100755
Empty file.
Empty file modified resources/views/auth/reset-password.blade.php
100644 → 100755
Empty file.
Empty file modified resources/views/auth/verify-email.blade.php
100644 → 100755
Empty file.
Empty file modified resources/views/components/application-logo.blade.php
100644 → 100755
Empty file.
Empty file modified resources/views/components/auth-card.blade.php
100644 → 100755
Empty file.
Empty file modified resources/views/components/auth-session-status.blade.php
100644 → 100755
Empty file.
Empty file modified resources/views/components/auth-validation-errors.blade.php
100644 → 100755
Empty file.
Empty file modified resources/views/components/button.blade.php
100644 → 100755
Empty file.
Empty file modified resources/views/components/dropdown-link.blade.php
100644 → 100755
Empty file.
Empty file modified resources/views/components/dropdown.blade.php
100644 → 100755
Empty file.
Empty file modified resources/views/components/input.blade.php
100644 → 100755
Empty file.
Empty file modified resources/views/components/label.blade.php
100644 → 100755
Empty file.
Empty file modified resources/views/components/nav-link.blade.php
100644 → 100755
Empty file.
Empty file modified resources/views/components/responsive-nav-link.blade.php
100644 → 100755
Empty file.
Empty file modified resources/views/dashboard.blade.php
100644 → 100755
Empty file.
Empty file modified resources/views/layouts/app.blade.php
100644 → 100755
Empty file.
Empty file modified resources/views/layouts/guest.blade.php
100644 → 100755
Empty file.
Empty file modified resources/views/layouts/navigation.blade.php
100644 → 100755
Empty file.
Empty file modified resources/views/pages/about.blade.php
100644 → 100755
Empty file.
Empty file modified resources/views/tasks/create.blade.php
100644 → 100755
Empty file.
Empty file modified resources/views/tasks/edit.blade.php
100644 → 100755
Empty file.
Empty file modified resources/views/tasks/index.blade.php
100644 → 100755
Empty file.
Empty file modified resources/views/users/notfound.blade.php
100644 → 100755
Empty file.
Empty file modified resources/views/users/show.blade.php
100644 → 100755
Empty file.
Empty file modified resources/views/welcome.blade.php
100644 → 100755
Empty file.
4 changes: 4 additions & 0 deletions routes/api.php
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php

use App\Http\Controllers\Api\V1\TaskController;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

Expand All @@ -23,5 +24,8 @@
// Keep in mind that prefix should be /api/v1.
// Add ONE line to assign 5 resource routes to TaskController
// Put one code line here below
Route::prefix('v1')->group(function(){
Route::resource('tasks',TaskController::class);
});

});
Empty file modified routes/auth.php
100644 → 100755
Empty file.
Empty file modified routes/channels.php
100644 → 100755
Empty file.
Empty file modified routes/console.php
100644 → 100755
Empty file.
23 changes: 20 additions & 3 deletions routes/web.php
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?php

use App\Http\Controllers\Admin\DashboardController as AdminDashboardController;
use App\Http\Controllers\Admin\StatsController;
use App\Http\Controllers\DashboardController;
use App\Http\Controllers\HomeController;
use App\Http\Controllers\TaskController;
use App\Http\Controllers\UserController;
use Illuminate\Support\Facades\Route;

/*
Expand All @@ -15,67 +21,78 @@

// Task 1: point the main "/" URL to the HomeController method "index"
// Put one code line here below
Route::get('/',[HomeController::class,'index']);


// Task 2: point the GET URL "/user/[name]" to the UserController method "show"
// It doesn't use Route Model Binding, it expects $name as a parameter
// Put one code line here below
Route::get('/user/{name}',[UserController::class,'show']);


// Task 3: point the GET URL "/about" to the view
// resources/views/pages/about.blade.php - without any controller
// Also, assign the route name "about"
// Put one code line here below

Route::view('/about','pages/about')->name('about');

// Task 4: redirect the GET URL "log-in" to a URL "login"
// Put one code line here below
Route::redirect('/log-in','login');


// Task 5: group the following route sentences below in Route::group()
// Assign middleware "auth"
// Put one Route Group code line here below
Route::group(['middleware' => 'auth'],function(){

// Tasks inside that Authenticated group:

// Task 6: /app group within a group
// Add another group for routes with prefix "app"
// Put one Route Group code line here below
Route::prefix('app')->group(function(){

// Tasks inside that /app group:


// Task 7: point URL /app/dashboard to a "Single Action" DashboardController
// Assign the route name "dashboard"
// Put one Route Group code line here below
Route::get('dashboard',DashboardController::class)->name('dashboard');


// Task 8: Manage tasks with URL /app/tasks/***.
// Add ONE line to assign 7 resource routes to TaskController
// Put one code line here below
Route::resource('tasks',TaskController::class);

});
// End of the /app Route Group


// Task 9: /admin group within a group
// Add a group for routes with URL prefix "admin"
// Assign middleware called "is_admin" to them
// Put one Route Group code line here below
Route::group(['prefix' => 'admin', 'middleware' => 'is_admin'], function(){


// Tasks inside that /admin group:


// Task 10: point URL /admin/dashboard to a "Single Action" Admin/DashboardController
// Put one code line here below
Route::get('dashboard',AdminDashboardController::class);


// Task 11: point URL /admin/stats to a "Single Action" Admin/StatsController
// Put one code line here below
Route::get('stats',StatsController::class);


});
// End of the /admin Route Group

});
// End of the main Authenticated Route Group

// One more task is in routes/api.php
Expand Down
Empty file modified server.php
100644 → 100755
Empty file.
Empty file modified storage/app/.gitignore
100644 → 100755
Empty file.
Empty file modified storage/app/public/.gitignore
100644 → 100755
Empty file.
Empty file modified storage/framework/.gitignore
100644 → 100755
Empty file.
Empty file modified storage/framework/cache/.gitignore
100644 → 100755
Empty file.
Empty file modified storage/framework/cache/data/.gitignore
100644 → 100755
Empty file.
Empty file modified storage/framework/sessions/.gitignore
100644 → 100755
Empty file.
Empty file modified storage/framework/testing/.gitignore
100644 → 100755
Empty file.
Empty file modified storage/framework/views/.gitignore
100644 → 100755
Empty file.
Empty file modified storage/logs/.gitignore
100644 → 100755
Empty file.
Empty file modified tailwind.config.js
100644 → 100755
Empty file.
Empty file modified tests/CreatesApplication.php
100644 → 100755
Empty file.
Empty file modified tests/Feature/RoutesTest.php
100644 → 100755
Empty file.
Empty file modified tests/TestCase.php
100644 → 100755
Empty file.
Empty file modified webpack.mix.js
100644 → 100755
Empty file.

0 comments on commit 5cb8f23

Please sign in to comment.