@@ -71,7 +71,7 @@ |
||
| 71 | 71 | { |
| 72 | 72 | $categories = auth()->user()->categories()->get(); |
| 73 | 73 | $bill_receive = auth()->user()->bill_receives()->findOrFail($id); |
| 74 | - return view('bill_receives.edit', compact('bill_receive','categories')); |
|
| 74 | + return view('bill_receives.edit', compact('bill_receive', 'categories')); |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | /** |
@@ -72,7 +72,7 @@ |
||
| 72 | 72 | { |
| 73 | 73 | $categories = auth()->user()->categories()->get(); |
| 74 | 74 | $bill_pay = auth()->user()->bill_pays()->findOrFail($id); |
| 75 | - return view('bill_pays.edit', compact('bill_pay','categories')); |
|
| 75 | + return view('bill_pays.edit', compact('bill_pay', 'categories')); |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | /** |
@@ -90,7 +90,7 @@ |
||
| 90 | 90 | { |
| 91 | 91 | $this->validate($request, [ |
| 92 | 92 | 'name' => 'required|string|max:255', |
| 93 | - 'email' => 'required|string|email|max:255|unique:users,email,'.$id |
|
| 93 | + 'email' => 'required|string|email|max:255|unique:users,email,' . $id |
|
| 94 | 94 | ]); |
| 95 | 95 | |
| 96 | 96 | $user = $this->user->whereNotIn('id', [auth()->user()->id, 1])->findOrFail($id); |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | */ |
| 25 | 25 | public function index() |
| 26 | 26 | { |
| 27 | - $dateStart = date('Y-m-d', mktime(0, 0, 0, date('m')-1 , 1 , date('Y'))); |
|
| 27 | + $dateStart = date('Y-m-d', mktime(0, 0, 0, date('m') - 1, 1, date('Y'))); |
|
| 28 | 28 | $dateEnd = date('Y-m-d', mktime(23, 59, 59, date('m'), date("t"), date('Y'))); |
| 29 | 29 | |
| 30 | 30 | $billPays = auth()->user()->bill_pays()->selectRaw('bill_pays.*, categories.name as category_name') |
@@ -61,6 +61,6 @@ discard block |
||
| 61 | 61 | ->where('status', '1') |
| 62 | 62 | ->get(); |
| 63 | 63 | |
| 64 | - return view('home', compact('billPays','billReceives','total_pays','total_receives','categoriesPay','categoriesReceive','dateStart','dateEnd','statements')); |
|
| 64 | + return view('home', compact('billPays', 'billReceives', 'total_pays', 'total_receives', 'categoriesPay', 'categoriesReceive', 'dateStart', 'dateEnd', 'statements')); |
|
| 65 | 65 | } |
| 66 | 66 | } |
@@ -35,9 +35,9 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | $friends = $user->friends()->pluck('id'); |
| 37 | 37 | $friends->push($user->id); |
| 38 | - $contents = $this->contentModel->whereIn('user_id', $friends)->with('user')->orderBy('published_at','DESC')->paginate(5); |
|
| 38 | + $contents = $this->contentModel->whereIn('user_id', $friends)->with('user')->orderBy('published_at', 'DESC')->paginate(5); |
|
| 39 | 39 | |
| 40 | - foreach($contents as $key => $content) { |
|
| 40 | + foreach ($contents as $key => $content) { |
|
| 41 | 41 | $content->total_likes = $content->likes()->count(); |
| 42 | 42 | $content->comments = $content->comments()->with('user')->orderBy('created_at', 'DESC')->get(); |
| 43 | 43 | $content->user_like_content = $user->likes()->find($content->id) ? true : false; |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | |
| 73 | 73 | $user->contents()->create($data); |
| 74 | 74 | |
| 75 | - $contents = $this->contentModel->with('user')->orderBy('published_at','DESC')->paginate(2); |
|
| 75 | + $contents = $this->contentModel->with('user')->orderBy('published_at', 'DESC')->paginate(2); |
|
| 76 | 76 | |
| 77 | 77 | return response()->json(['status' => 'success', 'message' => 'Conteúdo criada com sucesso', 'data' => $contents]); |
| 78 | 78 | } |
@@ -298,9 +298,9 @@ discard block |
||
| 298 | 298 | return response()->json(['status' => 'error', 'message' => 'Opss. Usuário não foi encontrado, favor verifique.']); |
| 299 | 299 | } |
| 300 | 300 | |
| 301 | - $contents = $userOwner->contents()->with('user')->orderBy('published_at','DESC')->paginate(2); |
|
| 301 | + $contents = $userOwner->contents()->with('user')->orderBy('published_at', 'DESC')->paginate(2); |
|
| 302 | 302 | |
| 303 | - foreach($contents as $key => $content) { |
|
| 303 | + foreach ($contents as $key => $content) { |
|
| 304 | 304 | $content->total_likes = $content->likes()->count(); |
| 305 | 305 | $content->comments = $content->comments()->with('user')->orderBy('created_at', 'DESC')->get(); |
| 306 | 306 | $content->user_like_content = $user->likes()->find($content->id) ? true : false; |
@@ -341,7 +341,7 @@ discard block |
||
| 341 | 341 | |
| 342 | 342 | return response()->json([ |
| 343 | 343 | 'status' => 'success', |
| 344 | - 'message' => 'Segguindo '.$friend->name.' com sucesso.', |
|
| 344 | + 'message' => 'Segguindo ' . $friend->name . ' com sucesso.', |
|
| 345 | 345 | 'data' => $user->friends, |
| 346 | 346 | 'followers' => $friend->followers |
| 347 | 347 | ]); |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | |
| 39 | 39 | $passwordReset = PasswordResetApi::updateOrCreate([ |
| 40 | 40 | 'email' => $user->email |
| 41 | - ],[ |
|
| 41 | + ], [ |
|
| 42 | 42 | 'email' => $user->email, |
| 43 | 43 | 'token' => str_random(60) |
| 44 | 44 | ]); |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | $total_pays = $billPays->sum('value'); |
| 50 | 50 | $total_receives = $billReceives->sum('value'); |
| 51 | 51 | |
| 52 | - return view('report.statement', compact('billPays','billReceives','total_pays','total_receives','statements')); |
|
| 52 | + return view('report.statement', compact('billPays', 'billReceives', 'total_pays', 'total_receives', 'statements')); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | public function charts() |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | ->where('status', '1') |
| 85 | 85 | ->get(); |
| 86 | 86 | |
| 87 | - return view('report.charts', compact('categoriesPay','categoriesReceive')); |
|
| 87 | + return view('report.charts', compact('categoriesPay', 'categoriesReceive')); |
|
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | } |
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | |
| 7 | 7 | class BillPay extends Model |
| 8 | 8 | { |
| 9 | - protected $fillable = ['date_launch','name','value','status','category_id']; |
|
| 9 | + protected $fillable = ['date_launch', 'name', 'value', 'status', 'category_id']; |
|
| 10 | 10 | |
| 11 | 11 | protected $casts = ['status' => 'boolean']; |
| 12 | 12 | |
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | |
| 7 | 7 | class BillReceive extends Model |
| 8 | 8 | { |
| 9 | - protected $fillable = ['date_launch','name','value','status','category_id']; |
|
| 9 | + protected $fillable = ['date_launch', 'name', 'value', 'status', 'category_id']; |
|
| 10 | 10 | |
| 11 | 11 | protected $casts = ['status' => 'boolean']; |
| 12 | 12 | |