@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | * Shows the landing page of |
32 | 32 | * Laravel Slack Package |
33 | 33 | * |
34 | - */ |
|
34 | + */ |
|
35 | 35 | public function slackPage() |
36 | 36 | { |
37 | 37 | return view('slack.slack'); |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | * Get Email, Validate and Send |
42 | 42 | * Invite to User |
43 | 43 | * |
44 | - */ |
|
44 | + */ |
|
45 | 45 | public function sendSlackInvite(Request $request) |
46 | 46 | { |
47 | 47 | $validator= Validator::make($request->all(),[ |
@@ -44,19 +44,19 @@ |
||
44 | 44 | */ |
45 | 45 | public function sendSlackInvite(Request $request) |
46 | 46 | { |
47 | - $validator= Validator::make($request->all(),[ |
|
47 | + $validator = Validator::make($request->all(), [ |
|
48 | 48 | 'email'=>'required|email' |
49 | 49 | ]); |
50 | 50 | |
51 | 51 | if ($validator->fails()) |
52 | 52 | { |
53 | - return redirect()->back()->with('error','Sorry! Please enter a valid mail or you have used this mail here'); |
|
54 | - }else{ |
|
53 | + return redirect()->back()->with('error', 'Sorry! Please enter a valid mail or you have used this mail here'); |
|
54 | + }else { |
|
55 | 55 | $email = $request->input('email'); |
56 | 56 | $this->client->request('POST', |
57 | 57 | config('LaravelSlack.slack_team_url').'/api/users.admin.invite?t='.time().'&email='.$email.'&token='.config('LaravelSlack.slack_api_token').'&set_active=true&_attempts=1' |
58 | 58 | ); |
59 | - return redirect()->back()->with('alert','Congratulation! Your Invite has been sent successfully to your mail'); |
|
59 | + return redirect()->back()->with('alert', 'Congratulation! Your Invite has been sent successfully to your mail'); |
|
60 | 60 | } |
61 | 61 | } |
62 | 62 | } |
@@ -51,7 +51,7 @@ |
||
51 | 51 | if ($validator->fails()) |
52 | 52 | { |
53 | 53 | return redirect()->back()->with('error','Sorry! Please enter a valid mail or you have used this mail here'); |
54 | - }else{ |
|
54 | + } else{ |
|
55 | 55 | $email = $request->input('email'); |
56 | 56 | $this->client->request('POST', |
57 | 57 | config('LaravelSlack.slack_team_url').'/api/users.admin.invite?t='.time().'&email='.$email.'&token='.config('LaravelSlack.slack_api_token').'&set_active=true&_attempts=1' |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | * Shows the landing page of |
29 | 29 | * Laravel Slack Package |
30 | 30 | * |
31 | - */ |
|
31 | + */ |
|
32 | 32 | public function slackPage() |
33 | 33 | { |
34 | 34 | return view('slack.slack'); |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | * Get Email, Validate and Send |
39 | 39 | * Invite to User |
40 | 40 | * |
41 | - */ |
|
41 | + */ |
|
42 | 42 | public function sendSlackInvite(Request $request) |
43 | 43 | { |
44 | 44 | $validator= Validator::make($request->all(),[ |
@@ -41,19 +41,19 @@ |
||
41 | 41 | */ |
42 | 42 | public function sendSlackInvite(Request $request) |
43 | 43 | { |
44 | - $validator= Validator::make($request->all(),[ |
|
44 | + $validator = Validator::make($request->all(), [ |
|
45 | 45 | 'email'=>'required|email' |
46 | 46 | ]); |
47 | 47 | |
48 | 48 | if ($validator->fails()) |
49 | 49 | { |
50 | - return redirect()->back()->with('error','Sorry! Please enter a valid mail or you have used this mail here'); |
|
51 | - }else{ |
|
50 | + return redirect()->back()->with('error', 'Sorry! Please enter a valid mail or you have used this mail here'); |
|
51 | + }else { |
|
52 | 52 | $email = $request->input('email'); |
53 | 53 | $this->client->request('POST', |
54 | 54 | config('LaravelSlack.slack_team_url').'/api/users.admin.invite?t='.time().'&email='.$email.'&token='.config('LaravelSlack.slack_api_token').'&set_active=true&_attempts=1' |
55 | 55 | ); |
56 | - return redirect()->back()->with('alert','Congratulation! Your Invite has been sent successfully to your mail'); |
|
56 | + return redirect()->back()->with('alert', 'Congratulation! Your Invite has been sent successfully to your mail'); |
|
57 | 57 | } |
58 | 58 | } |
59 | 59 | } |
@@ -48,7 +48,7 @@ |
||
48 | 48 | if ($validator->fails()) |
49 | 49 | { |
50 | 50 | return redirect()->back()->with('error','Sorry! Please enter a valid mail or you have used this mail here'); |
51 | - }else{ |
|
51 | + } else{ |
|
52 | 52 | $email = $request->input('email'); |
53 | 53 | $this->client->request('POST', |
54 | 54 | config('LaravelSlack.slack_team_url').'/api/users.admin.invite?t='.time().'&email='.$email.'&token='.config('LaravelSlack.slack_api_token').'&set_active=true&_attempts=1' |
@@ -47,9 +47,9 @@ |
||
47 | 47 | public function register() |
48 | 48 | { |
49 | 49 | |
50 | - $this->loadViewsFrom(__DIR__.'/views/slack','slack'); |
|
51 | - $this->mergeConfigFrom( __DIR__.'/config/LaravelSlack.php', 'LaravelSlack'); |
|
52 | - $this->app->singleton(LaravelSlack::class, function ($app) { |
|
50 | + $this->loadViewsFrom(__DIR__.'/views/slack', 'slack'); |
|
51 | + $this->mergeConfigFrom(__DIR__.'/config/LaravelSlack.php', 'LaravelSlack'); |
|
52 | + $this->app->singleton(LaravelSlack::class, function($app) { |
|
53 | 53 | return new LaravelSlack(config('laravelslack')); |
54 | 54 | }); |
55 | 55 | } |