44 lines
874 B
PHP
44 lines
874 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use Illuminate\Http\Request;
|
|
use App\Models\Customer;
|
|
|
|
|
|
class DatabaseController extends Controller
|
|
{
|
|
//{
|
|
public function index()
|
|
{
|
|
$customer = new Customer();
|
|
$customer = $customer->get();
|
|
return view('dashbord.dashbord',[
|
|
'customer' =>$customer
|
|
]);
|
|
|
|
// }
|
|
// public function customersData(){
|
|
// $customers = Customer::all();
|
|
// return view('Admin.all_customers',compact('customers'));
|
|
// }
|
|
|
|
|
|
|
|
// public function delete($id)
|
|
// {
|
|
// $customer = Customer::find($id);
|
|
// if($customer->delete())
|
|
// {
|
|
|
|
// return redirect()->back()->with(['msg' => 1]);
|
|
// }
|
|
// else
|
|
// {
|
|
// return redirect()->back()->with(['msg' => 2]);
|
|
// }
|
|
|
|
}
|
|
|
|
}
|