@@ -37,7 +37,7 @@ |
||
| 37 | 37 | */ |
| 38 | 38 | public function map(Router $router) |
| 39 | 39 | { |
| 40 | - $router->group(['namespace' => $this->namespace], function ($router) { |
|
| 40 | + $router->group([ 'namespace' => $this->namespace ], function($router) { |
|
| 41 | 41 | require app_path('Http/routes.php'); |
| 42 | 42 | }); |
| 43 | 43 | } |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | */ |
| 38 | 38 | public function __construct() |
| 39 | 39 | { |
| 40 | - $this->middleware('guest', ['except' => 'logout']); |
|
| 40 | + $this->middleware('guest', [ 'except' => 'logout' ]); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | /** |
@@ -64,9 +64,9 @@ discard block |
||
| 64 | 64 | protected function create(array $data) |
| 65 | 65 | { |
| 66 | 66 | return User::create([ |
| 67 | - 'fullname' => $data['name'], |
|
| 68 | - 'email' => $data['email'], |
|
| 69 | - 'password' => bcrypt($data['password']), |
|
| 67 | + 'fullname' => $data[ 'name' ], |
|
| 68 | + 'email' => $data[ 'email' ], |
|
| 69 | + 'password' => bcrypt($data[ 'password' ]), |
|
| 70 | 70 | ]); |
| 71 | 71 | } |
| 72 | 72 | |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | $crawler = $this->client->request('GET', $siteToCrawl); |
| 42 | 42 | |
| 43 | 43 | $arr = $crawler->filter('.title a[href^="http"], a[href^="https"]')->each(function($element) { |
| 44 | - $links = []; |
|
| 44 | + $links = [ ]; |
|
| 45 | 45 | |
| 46 | 46 | array_push($links, $element->text()); |
| 47 | 47 | |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace App\Http\Controllers; |
| 4 | 4 | |
| 5 | -use App\Http\Requests; |
|
| 6 | 5 | use Goutte\Client; |
| 7 | 6 | |
| 8 | 7 | class WebScrapingController extends Controller |
@@ -38,9 +38,9 @@ |
||
| 38 | 38 | */ |
| 39 | 39 | private function getRoutes($zipcode) |
| 40 | 40 | { |
| 41 | - $results = $this->lob->routes()->all(['zip_codes' => $zipcode]); |
|
| 41 | + $results = $this->lob->routes()->all([ 'zip_codes' => $zipcode ]); |
|
| 42 | 42 | |
| 43 | - return $results[0]['routes']; |
|
| 43 | + return $results[ 0 ][ 'routes' ]; |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | /** |
@@ -34,12 +34,12 @@ |
||
| 34 | 34 | $endpoint = 'venues/search'; |
| 35 | 35 | |
| 36 | 36 | // Prepare parameters |
| 37 | - $params = ['near' => 'Lagos, Nigeria']; |
|
| 37 | + $params = [ 'near' => 'Lagos, Nigeria' ]; |
|
| 38 | 38 | |
| 39 | 39 | // Perform a request to a public resource |
| 40 | - $response = json_decode($this->foursquare->GetPublic($endpoint,$params),true); |
|
| 40 | + $response = json_decode($this->foursquare->GetPublic($endpoint, $params), true); |
|
| 41 | 41 | |
| 42 | - return $response['response']['venues']; |
|
| 42 | + return $response[ 'response' ][ 'venues' ]; |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /** |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | { |
| 36 | 36 | $info = $this->tumblr->blogInfo($tumblrBlogUrl); |
| 37 | 37 | |
| 38 | - return (array)$info; |
|
| 38 | + return (array) $info; |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | /** |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | { |
| 47 | 47 | $info = $this->tumblr->posts($tumblrBlogUrl); |
| 48 | 48 | |
| 49 | - return (array)$info->response->posts; |
|
| 49 | + return (array) $info->response->posts; |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | /** |
@@ -2,5 +2,5 @@ |
||
| 2 | 2 | |
| 3 | 3 | function load_asset($asset_url) |
| 4 | 4 | { |
| 5 | - return ( env('APP_ENV') === 'production' ) ? secure_asset($asset_url) : asset($asset_url); |
|
| 5 | + return (env('APP_ENV') === 'production') ? secure_asset($asset_url) : asset($asset_url); |
|
| 6 | 6 | } |
@@ -27,8 +27,8 @@ |
||
| 27 | 27 | |
| 28 | 28 | public function getAvatarUrl() |
| 29 | 29 | { |
| 30 | - if(is_null($this->avatar)) { |
|
| 31 | - return "http://www.gravatar.com/avatar/" . md5(strtolower(trim($this->email))) . "?d=mm&s=40"; |
|
| 30 | + if (is_null($this->avatar)) { |
|
| 31 | + return "http://www.gravatar.com/avatar/".md5(strtolower(trim($this->email)))."?d=mm&s=40"; |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | return $this->avatar; |
@@ -34,14 +34,14 @@ discard block |
||
| 34 | 34 | public function updateProfile(Request $request) |
| 35 | 35 | { |
| 36 | 36 | $this->validate($request, [ |
| 37 | - 'email' => 'required|email|min:3|unique:users,email,'. $this->id, |
|
| 37 | + 'email' => 'required|email|min:3|unique:users,email,'.$this->id, |
|
| 38 | 38 | 'fullname' => 'required|min:3' |
| 39 | 39 | ]); |
| 40 | 40 | |
| 41 | 41 | $values = $request->all(); |
| 42 | 42 | $this->user->fill($values)->save(); |
| 43 | 43 | |
| 44 | - return redirect()->back()->with('info','Your Profile has been updated successfully'); |
|
| 44 | + return redirect()->back()->with('info', 'Your Profile has been updated successfully'); |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | public function updateAvatar(Request $request) |
@@ -50,14 +50,14 @@ discard block |
||
| 50 | 50 | 'file_name' => 'required|mimes:jpeg,bmp,png|between:1,7000', |
| 51 | 51 | ]); |
| 52 | 52 | |
| 53 | - $filename = $request->file('file_name')->getRealPath(); |
|
| 53 | + $filename = $request->file('file_name')->getRealPath(); |
|
| 54 | 54 | |
| 55 | 55 | Cloudder::upload($filename, null); |
| 56 | 56 | list($width, $height) = getimagesize($filename); |
| 57 | 57 | |
| 58 | - $fileUrl = Cloudder::show(Cloudder::getPublicId(), ["width" => $width, "height" => $height]); |
|
| 58 | + $fileUrl = Cloudder::show(Cloudder::getPublicId(), [ "width" => $width, "height" => $height ]); |
|
| 59 | 59 | |
| 60 | - $this->user->update(['avatar' => $fileUrl]); |
|
| 60 | + $this->user->update([ 'avatar' => $fileUrl ]); |
|
| 61 | 61 | |
| 62 | 62 | return redirect()->back()->with('info', 'Your Avatar has been updated Successfully'); |
| 63 | 63 | } |