Skip to content

Commit f04a3a1

Browse files
committed
little changes
1 parent a2e7483 commit f04a3a1

12 files changed

+63
-26
lines changed

app/Http/Controllers/cart.php renamed to app/Http/Controllers/CartController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Illuminate\Http\Request;
66

7-
class cart extends Controller
7+
class CartController extends Controller
88
{
99
//
1010
}
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
<?php
22

33
namespace App\Http\Controllers;
4-
54
use Illuminate\Http\Request;
65

7-
class Home extends Controller
6+
7+
class HomeController extends Controller
88
{
9+
//
910
public function index(){
11+
1012
return view('welcome');
1113
}
1214
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
namespace App\Http\Controllers;
4+
5+
use Illuminate\Http\Request;
6+
7+
class ItemController extends Controller
8+
{
9+
//
10+
11+
public Function show_items(){
12+
$item = array(
13+
'name' => 'cups',
14+
'quantity'=> 30,
15+
'price' => 89
16+
);
17+
18+
return view('shopping_list',$item);
19+
}
20+
}

app/Http/Controllers/Items.php

Lines changed: 0 additions & 18 deletions
This file was deleted.

app/Http/Controllers/user.php renamed to app/Http/Controllers/UserController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Illuminate\Http\Request;
66

7-
class user extends Controller
7+
class UserController extends Controller
88
{
99
//
1010
}

app/Models/Cartmodel.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
namespace App\Models;
4+
5+
use Illuminate\Database\Eloquent\Factories\HasFactory;
6+
use Illuminate\Database\Eloquent\Model;
7+
8+
class Cartmodel extends Model
9+
{
10+
use HasFactory;
11+
}

app/Models/ItemsModel.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
namespace App\Models;
4+
5+
use Illuminate\Database\Eloquent\Factories\HasFactory;
6+
use Illuminate\Database\Eloquent\Model;
7+
8+
class ItemsModel extends Model
9+
{
10+
use HasFactory;
11+
}

app/Models/UserModel.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
namespace App\Models;
4+
5+
use Illuminate\Database\Eloquent\Factories\HasFactory;
6+
use Illuminate\Database\Eloquent\Model;
7+
8+
class UserModel extends Model
9+
{
10+
use HasFactory;
11+
}

app/Models/customer.php

Whitespace-only changes.

app/Models/items.php

Whitespace-only changes.

app/Models/wishlist.php

Whitespace-only changes.

routes/web.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?php
22

33
use Illuminate\Support\Facades\Route;
4+
use App\Http\Controllers\HomeController;
5+
use App\Http\Controllers\ItemController;
46

57
/*
68
|--------------------------------------------------------------------------
@@ -12,7 +14,5 @@
1214
| contains the "web" middleware group. Now create something great!
1315
|
1416
*/
15-
16-
Route::get('/', 'Home@index');
17-
18-
Route::get('/shopping_list', 'Item@show_items');
17+
Route::get('/', [HomeController::class, 'index']);
18+
Route::get('/shopping_list', [ItemController::class, 'show_items']);

0 commit comments

Comments
 (0)