@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | { |
15 | 15 | if ($this->app->runningInConsole()) { |
16 | 16 | $this->commands([ |
17 | - ResponsiveQuote::class, //the console class |
|
17 | + ResponsiveQuote::class, //the console class |
|
18 | 18 | ]); |
19 | 19 | } |
20 | 20 | |
@@ -37,13 +37,13 @@ discard block |
||
37 | 37 | __DIR__.'/../resources/assets/sass' => resource_path('sass/vendor/responsive-quotes/'), |
38 | 38 | ], 'sass'); |
39 | 39 | |
40 | - if (! class_exists('CreateQuotesTable')) { |
|
40 | + if (!class_exists('CreateQuotesTable')) { |
|
41 | 41 | $this->publishes([ |
42 | 42 | __DIR__.'/../database/migrations/create_quotes_table.php.stub' => database_path('migrations/'.Carbon::now()->format('Y_m_d_Hmsu').'_create_quotes_table.php'), |
43 | 43 | ], 'migrations'); |
44 | 44 | } |
45 | 45 | |
46 | - if (! class_exists('CreateQuoteTranslationsTable')) { |
|
46 | + if (!class_exists('CreateQuoteTranslationsTable')) { |
|
47 | 47 | $this->publishes([ |
48 | 48 | __DIR__.'/../database/migrations/create_quote_translations_table.php.stub' => database_path('migrations/'.Carbon::now()->format('Y_m_d_Hmsu').'_create_quote_translations_table.php'), |
49 | 49 | ], 'migrations'); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | |
62 | 62 | public function register() |
63 | 63 | { |
64 | - $this->app->bind('php-responsive-quote', function () { |
|
64 | + $this->app->bind('php-responsive-quote', function() { |
|
65 | 65 | return new QuoteFactory(); |
66 | 66 | }); |
67 | 67 |
@@ -24,17 +24,17 @@ |
||
24 | 24 | |
25 | 25 | if ($searchKeywords) { |
26 | 26 | $quotes = Quote::orderBy('author') |
27 | - ->where('author', 'like', '%'.$request->input('keywords').'%') |
|
28 | - ->paginate(20); |
|
27 | + ->where('author', 'like', '%'.$request->input('keywords').'%') |
|
28 | + ->paginate(20); |
|
29 | 29 | } else { |
30 | 30 | $quotes = Quote::orderBy('author') |
31 | - ->paginate(20); |
|
31 | + ->paginate(20); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | return view('php-responsive-quote::quotes.index', compact('quotes')) |
35 | - ->with('i', (request()->input('page', 1) - 1) * 20) |
|
36 | - ->with('searchKeywords', $searchKeywords) |
|
37 | - ->with('countriesAvailableForTranslations', $countriesAvailableForTranslations); |
|
35 | + ->with('i', (request()->input('page', 1) - 1) * 20) |
|
36 | + ->with('searchKeywords', $searchKeywords) |
|
37 | + ->with('countriesAvailableForTranslations', $countriesAvailableForTranslations); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | /***************************************************************************/ |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | - Route::group(['namespace' => 'DavideCasiraghi\PhpResponsiveRandomQuote\Http\Controllers', 'middleware' => 'web'], function () { |
|
3 | + Route::group(['namespace' => 'DavideCasiraghi\PhpResponsiveRandomQuote\Http\Controllers', 'middleware' => 'web'], function() { |
|
4 | 4 | |
5 | 5 | /* Quotes */ |
6 | 6 | Route::resource('php-responsive-quote', 'ResponsiveQuoteController'); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | public function getQuoteOfTheDay() |
29 | 29 | { |
30 | 30 | $numberOfQuotesInDB = Quote::count(); |
31 | - $quoteOfTheDayNumber = rand(1,$numberOfQuotesInDB); |
|
31 | + $quoteOfTheDayNumber = rand(1, $numberOfQuotesInDB); |
|
32 | 32 | |
33 | 33 | $quotes = Quote::all(); |
34 | 34 | |
@@ -37,14 +37,14 @@ discard block |
||
37 | 37 | |
38 | 38 | |
39 | 39 | |
40 | - public function setCookie(Request $request){ |
|
40 | + public function setCookie(Request $request) { |
|
41 | 41 | $minutes = 60; |
42 | 42 | $response = new Response('Set Cookie'); |
43 | 43 | $response->withCookie(cookie('quoteOfTheDayId', 'MyValue', $minutes)); |
44 | 44 | return $response; |
45 | 45 | } |
46 | 46 | |
47 | - public function getCookie(Request $request){ |
|
47 | + public function getCookie(Request $request) { |
|
48 | 48 | $value = $request->cookie('quoteOfTheDayId'); |
49 | 49 | echo $value; |
50 | 50 | } |