File tree Expand file tree Collapse file tree 2 files changed +13
-43
lines changed
Expand file tree Collapse file tree 2 files changed +13
-43
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,19 @@ public function index()
2525 ->with (compact ('models ' ));
2626 }
2727
28+ /**
29+ * Show place.
30+ *
31+ * @return \Illuminate\View\View
32+ */
33+ public function show ($ slug )
34+ {
35+ $ model = $ this ->repository ->bySlug ($ slug );
36+
37+ return view ('places::public.show ' )
38+ ->with (compact ('model ' ));
39+ }
40+
2841 public function json ()
2942 {
3043 return $ this ->repository ->all ()->map (function ($ item ){
@@ -38,36 +51,4 @@ public function jsonItem($id)
3851 {
3952 return $ this ->repository ->find ($ id );
4053 }
41-
42- /**
43- * Search models.
44- *
45- * @return \Illuminate\Support\Facades\Response
46- */
47- public function search ()
48- {
49- $ models = $ this ->repository ->all ();
50- if (request ()->wantsJson ()) {
51- return $ models ;
52- }
53-
54- return view ('places::public.results ' )
55- ->with (compact ('models ' ));
56- }
57-
58- /**
59- * Show place.
60- *
61- * @return \Illuminate\View\View
62- */
63- public function show ($ slug )
64- {
65- $ model = $ this ->repository ->bySlug ($ slug );
66- if (request ()->wantsJson ()) {
67- return $ model ;
68- }
69-
70- return view ('places::public.show ' )
71- ->with (compact ('model ' ));
72- }
7354}
Original file line number Diff line number Diff line change 1818
1919 <div class =" col-sm-4" >
2020
21- <h2 >@lang (' Filter' )</h2 >
22- <form method =" get" role =" form" >
23- <label for =" string" class =" sr-only" >@lang (' Search' )</label >
24- <div class =" input-group input-group-lg" >
25- <input id =" string" type =" text" name =" string" value =" {{ request (' string' ) } }" class =" form-control form-control-sm" >
26- <span class =" input-group-append" >
27- <button type =" submit" class =" btn btn-sm btn-primary" >@lang (' Search' )</button >
28- </span >
29- </div >
30- </form >
31-
3221 <h3 >
3322 {{ $models -> count () } } @lang (' Places' )
3423 @if (request (' string' ) ) @lang (' for' )
You can’t perform that action at this time.
0 commit comments