@@ -17,39 +17,39 @@ |
||
17 | 17 | * |
18 | 18 | * @return \Illuminate\Http\Response |
19 | 19 | */ |
20 | - public function index(Request $request) |
|
21 | - { |
|
20 | + public function index(Request $request) |
|
21 | + { |
|
22 | 22 | |
23 | - $searchKeywords = $request->input('keywords'); |
|
24 | - |
|
25 | - if ($searchKeywords) { |
|
26 | - $quotes = Quote::orderBy('author') |
|
27 | - ->where('author', 'like', '%'.$request->input('keywords').'%') |
|
28 | - ->paginate(20); |
|
29 | - } else { |
|
30 | - $quotes = Quote::orderBy('author') |
|
31 | - ->paginate(20); |
|
32 | - } |
|
33 | - |
|
34 | - return view('php-responsive-quote::index', compact('quotes')) |
|
35 | - ->with('i', (request()->input('page', 1) - 1) * 20) |
|
36 | - ->with('searchKeywords', $searchKeywords); |
|
23 | + $searchKeywords = $request->input('keywords'); |
|
24 | + |
|
25 | + if ($searchKeywords) { |
|
26 | + $quotes = Quote::orderBy('author') |
|
27 | + ->where('author', 'like', '%'.$request->input('keywords').'%') |
|
28 | + ->paginate(20); |
|
29 | + } else { |
|
30 | + $quotes = Quote::orderBy('author') |
|
31 | + ->paginate(20); |
|
32 | + } |
|
33 | + |
|
34 | + return view('php-responsive-quote::index', compact('quotes')) |
|
35 | + ->with('i', (request()->input('page', 1) - 1) * 20) |
|
36 | + ->with('searchKeywords', $searchKeywords); |
|
37 | 37 | //return view('php-responsive-quote::index'); |
38 | - } |
|
38 | + } |
|
39 | 39 | |
40 | - /***************************************************************************/ |
|
41 | - |
|
42 | - /** |
|
43 | - * Show the form for creating a new resource. |
|
44 | - * |
|
45 | - * @return \Illuminate\Http\Response |
|
46 | - */ |
|
47 | - public function create() |
|
48 | - { |
|
49 | - return view('php-responsive-quote::create'); |
|
50 | - } |
|
40 | + /***************************************************************************/ |
|
41 | + |
|
42 | + /** |
|
43 | + * Show the form for creating a new resource. |
|
44 | + * |
|
45 | + * @return \Illuminate\Http\Response |
|
46 | + */ |
|
47 | + public function create() |
|
48 | + { |
|
49 | + return view('php-responsive-quote::create'); |
|
50 | + } |
|
51 | 51 | |
52 | - /***************************************************************************/ |
|
52 | + /***************************************************************************/ |
|
53 | 53 | |
54 | 54 | /** |
55 | 55 | * Store a newly created resource in storage. |