source:
app/Http/Controllers/OfficerController.php@
d9c4096
| Last change on this file since d9c4096 was d9c4096, checked in by , 19 months ago | |
|---|---|
|
|
| File size: 660 bytes | |
| Rev | Line | |
|---|---|---|
| [75151c6] | 1 | <?php |
| 2 | ||
| 3 | namespace App\Http\Controllers; | |
| 4 | ||
| [6b10b67] | 5 | use App\Models\Policeman; |
| [cf84baa] | 6 | use Illuminate\Contracts\Auth\Authenticatable; |
| [75151c6] | 7 | use Illuminate\Http\Request; |
| [6b10b67] | 8 | use Illuminate\Support\Facades\DB; |
| [d9c4096] | 9 | use Illuminate\Support\Facades\Session; |
| [75151c6] | 10 | |
| 11 | class OfficerController extends Controller | |
| 12 | { | |
| 13 | function employees() | |
| 14 | { | |
| [d9c4096] | 15 | if(Session::get('pe_id') == null) { |
| 16 | return view('login'); | |
| 17 | } | |
| [6b10b67] | 18 | $results = DB::select('select * from policeman join people on policeman.pe_id = people.pe_id;'); |
| 19 | return view('employees', [ | |
| 20 | 'employees' => $results | |
| 21 | ]); | |
| 22 | } | |
| 23 | ||
| 24 | function register() | |
| 25 | { | |
| 26 | return view('register-policeman'); | |
| [75151c6] | 27 | } |
| [cf84baa] | 28 | |
| 29 | ||
| [75151c6] | 30 | } |
Note:
See TracBrowser
for help on using the repository browser.