Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. Route::get('{device}', function ($device) {
  2. $data = json_decode(file_get_contents('json/brands.json'));
  3. foreach($data as $bc => $brand) {
  4. foreach($brand->devices as $codename) {
  5. if ($codename == $device) {
  6. return view('device');
  7. }
  8. }
  9. }
  10. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement