31 lines
502 B
PHP
31 lines
502 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Models\Device;
|
|
use Illuminate\Http\Request;
|
|
|
|
class DeviceController extends Controller
|
|
{
|
|
//
|
|
public function index()
|
|
{
|
|
return view('devices.index', [
|
|
'devices' => Device::all()
|
|
]);
|
|
}
|
|
|
|
public function create(){
|
|
return view('devices.create', [
|
|
|
|
]);
|
|
}
|
|
|
|
public function show(Device $device)
|
|
{
|
|
return view('devices.show', [
|
|
'device' => $device
|
|
]);
|
|
}
|
|
}
|