diff --git a/app/Http/Controllers/Admin/ClientController.php b/app/Http/Controllers/ClientsController.php similarity index 68% rename from app/Http/Controllers/Admin/ClientController.php rename to app/Http/Controllers/ClientsController.php index 2cb9823..0816a9c 100644 --- a/app/Http/Controllers/Admin/ClientController.php +++ b/app/Http/Controllers/ClientsController.php @@ -11,34 +11,39 @@ class ClientController extends Controller { /** * Display a listing of the resource. - */ + */ public function index() { - // - } + // dd("hello"); + $clients= Client::all(); + return view('admin.client.index',compact('clients')); + } + /** * Show the form for creating a new resource. */ public function create() { - // - } + return view('admin.client.create' ,compact('clients')); + } + /** * Store a newly created resource in storage. */ - public function store(Request $request) - { - // - } + // public function store(Request $request) + // { + // return view('admin.client.store'); + // } + /** * Display the specified resource. */ public function show(Client $client) { - // + return view('admin.client.show',compact('clients')); } /** @@ -46,7 +51,7 @@ public function show(Client $client) */ public function edit(Client $client) { - // + return view('admin.client.edit',compact('clients')); } /** diff --git a/app/Models/Client.php b/app/Models/Client.php deleted file mode 100644 index 36bf29e..0000000 --- a/app/Models/Client.php +++ /dev/null @@ -1,10 +0,0 @@ -id(); + $table-> string('name')->unique(); + $table-> string('email')->unique(); + $table-> integer('phone_number')->unique(); + $table-> string('address')->nullable(); + $table->enum('status',['active','inactive'])->default('active'); $table->timestamps(); }); } diff --git a/resources/views/admin/client/create.blade.php b/resources/views/admin/client/create.blade.php new file mode 100644 index 0000000..f0ebf4c --- /dev/null +++ b/resources/views/admin/client/create.blade.php @@ -0,0 +1,49 @@ +@extends('admin.layouts.master') + +@section('content') +
| Name | +Phone | +Address | +Action | +||
|---|---|---|---|---|---|
| {{ $data->name }} | +{{ $data->email }} | +{{ $data->phone }} | +{{ $data->address }} | +{{ $data->designation }} | ++ {{-- edit --}} + + Edit + + {{-- for delete --}} + + + | +