25 lines
412 B
PHP
25 lines
412 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 show(Device $device)
|
|
{
|
|
return view('devices.show', [
|
|
'device' => $device
|
|
]);
|
|
}
|
|
}
|