@@ -57,7 +57,7 @@ |
||
| 57 | 57 | $manager->guard('edit'); |
| 58 | 58 | |
| 59 | 59 | return redirect()->to($manager->route('edit')) |
| 60 | - ->with('messages.success', '<i class="fa fa-fw fa-check-circle"></i> "' . $manager->details()->title . '" is toegevoegd'); |
|
| 60 | + ->with('messages.success', '<i class="fa fa-fw fa-check-circle"></i> "' . $manager->details()->title . '" is toegevoegd'); |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | public function edit(string $key, $id) |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | $manager->guard('edit'); |
| 58 | 58 | |
| 59 | 59 | return redirect()->to($manager->route('edit')) |
| 60 | - ->with('messages.success', '<i class="fa fa-fw fa-check-circle"></i> "' . $manager->details()->title . '" is toegevoegd'); |
|
| 60 | + ->with('messages.success', '<i class="fa fa-fw fa-check-circle"></i> "'.$manager->details()->title.'" is toegevoegd'); |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | public function edit(string $key, $id) |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | return redirect()->to($manager->route('edit'))->with('messages.error', 'Een van de fotos die je uploadde bestond al.'); |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | - return redirect()->to($manager->route('edit'))->with('messages.success', '<i class="fa fa-fw fa-check-circle"></i> "' . $manager->details()->title . '" werd aangepast'); |
|
| 93 | + return redirect()->to($manager->route('edit'))->with('messages.success', '<i class="fa fa-fw fa-check-circle"></i> "'.$manager->details()->title.'" werd aangepast'); |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | public function delete(string $key, $id, Request $request) |
@@ -100,10 +100,10 @@ discard block |
||
| 100 | 100 | try { |
| 101 | 101 | app(DeleteManager::class)->handle($manager, $request); |
| 102 | 102 | } catch (DeleteAborted $e) { |
| 103 | - return redirect()->back()->with('messages.warning', $manager->details()->singular . ' is niet verwijderd.'); |
|
| 103 | + return redirect()->back()->with('messages.warning', $manager->details()->singular.' is niet verwijderd.'); |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | return redirect()->to($manager->route('index')) |
| 107 | - ->with('messages.success', '<i class="fa fa-fw fa-check-circle"></i> "' . $manager->details()->title . '" is verwijderd.'); |
|
| 107 | + ->with('messages.success', '<i class="fa fa-fw fa-check-circle"></i> "'.$manager->details()->title.'" is verwijderd.'); |
|
| 108 | 108 | } |
| 109 | 109 | } |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | $role->givePermissionTo($request->permission_names); |
| 43 | 43 | |
| 44 | 44 | return redirect()->route('chief.back.roles.index') |
| 45 | - ->with('messages.success', 'Rol '. $role->name.' is toegevoegd.'); |
|
| 45 | + ->with('messages.success', 'Rol '. $role->name.' is toegevoegd.'); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | public function edit($id) |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | $role->givePermissionTo($request->permission_names); |
| 43 | 43 | |
| 44 | 44 | return redirect()->route('chief.back.roles.index') |
| 45 | - ->with('messages.success', 'Rol '. $role->name.' is toegevoegd.'); |
|
| 45 | + ->with('messages.success', 'Rol '.$role->name.' is toegevoegd.'); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | public function edit($id) |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | $role->syncPermissions($request->permission_names); |
| 72 | 72 | |
| 73 | 73 | return redirect()->route('chief.back.roles.index') |
| 74 | - ->with('messages.success', 'Rol '. $role->name.' is aangepast.'); |
|
| 74 | + ->with('messages.success', 'Rol '.$role->name.' is aangepast.'); |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | public function destroy($id) |
@@ -82,6 +82,6 @@ discard block |
||
| 82 | 82 | $role->delete(); |
| 83 | 83 | |
| 84 | 84 | return redirect()->route('chief.back.roles.index') |
| 85 | - ->with('messages.success', 'Rol '. $role->name.' is verwijderd.'); |
|
| 85 | + ->with('messages.success', 'Rol '.$role->name.' is verwijderd.'); |
|
| 86 | 86 | } |
| 87 | 87 | } |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | } |
| 57 | 57 | return redirect()->route('chief.back.permissions.index') |
| 58 | 58 | ->with('flash_message', |
| 59 | - 'Permission'. $permission->name.' added!'); |
|
| 59 | + 'Permission'.$permission->name.' added!'); |
|
| 60 | 60 | } |
| 61 | 61 | /** |
| 62 | 62 | * Display the specified resource. |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | $permission->fill($input)->save(); |
| 99 | 99 | return redirect()->route('chief.back.permissions.index') |
| 100 | 100 | ->with('flash_message', |
| 101 | - 'Permission'. $permission->name.' updated!'); |
|
| 101 | + 'Permission'.$permission->name.' updated!'); |
|
| 102 | 102 | } |
| 103 | 103 | /** |
| 104 | 104 | * Remove the specified resource from storage. |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | $responseContent = []; |
| 46 | 46 | |
| 47 | 47 | foreach ($uploads as $upload) { |
| 48 | - if (! $asset = AssetUploader::upload($upload)) { |
|
| 48 | + if (!$asset = AssetUploader::upload($upload)) { |
|
| 49 | 49 | return response()->json([ |
| 50 | 50 | 'error' => true, |
| 51 | 51 | 'messages' => 'Afbeelding kan niet worden opgeladen.', |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | $this->authorize('create-page'); |
| 22 | 22 | |
| 23 | 23 | $menuitem = new MenuItem; |
| 24 | - $menuitem->type = MenuItem::TYPE_INTERNAL; // Default menu type |
|
| 24 | + $menuitem->type = MenuItem::TYPE_INTERNAL; // Default menu type |
|
| 25 | 25 | $menuitem->menu_type = $menutype; |
| 26 | 26 | |
| 27 | 27 | $menuitems = ChiefMenu::fromMenuItems($menuitem->menuType())->getForSelect(); |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | ->performedOn($menu) |
| 45 | 45 | ->log('created'); |
| 46 | 46 | |
| 47 | - return redirect()->route('chief.back.menus.show', $menu->menu_type)->with('messages.success', $menu->label . ' is aangemaakt'); |
|
| 47 | + return redirect()->route('chief.back.menus.show', $menu->menu_type)->with('messages.success', $menu->label.' is aangemaakt'); |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | public function edit($id) |
@@ -64,9 +64,9 @@ discard block |
||
| 64 | 64 | } |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | - $menuitems = ChiefMenu::fromMenuItems($menuitem->menuType())->getForSelect($id); |
|
| 67 | + $menuitems = ChiefMenu::fromMenuItems($menuitem->menuType())->getForSelect($id); |
|
| 68 | 68 | |
| 69 | - $pages = FlatReferencePresenter::toGroupedSelectValues(Page::all()->reject(function ($page) { |
|
| 69 | + $pages = FlatReferencePresenter::toGroupedSelectValues(Page::all()->reject(function($page) { |
|
| 70 | 70 | return $page->hidden_in_menu == true; |
| 71 | 71 | }))->toArray(); |
| 72 | 72 | |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | ->performedOn($menu) |
| 90 | 90 | ->log('updated'); |
| 91 | 91 | |
| 92 | - return redirect()->route('chief.back.menus.show', $menu->menu_type)->with('messages.success', $menu->label . ' is aangepast'); |
|
| 92 | + return redirect()->route('chief.back.menus.show', $menu->menu_type)->with('messages.success', $menu->label.' is aangepast'); |
|
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | public function destroy($id) |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | ->log('deleted'); |
| 107 | 107 | |
| 108 | 108 | return redirect()->route('chief.back.menus.show', $menuItem->menuType())->with('messages.warning', $message); |
| 109 | - } else { |
|
| 109 | + }else { |
|
| 110 | 110 | return redirect()->back()->with('messages.warning', 'Je menu item is niet verwijderd. Probeer opnieuw'); |
| 111 | 111 | } |
| 112 | 112 | } |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | $this->authorize('view-squanto'); |
| 18 | 18 | |
| 19 | 19 | $pages = Page::sequence()->get(); |
| 20 | - $pages->each(function ($page) { |
|
| 20 | + $pages->each(function($page) { |
|
| 21 | 21 | $page->groupedlines = $this->groupLinesByKey($page); |
| 22 | 22 | }); |
| 23 | 23 | return view('squanto::index', compact('pages')); |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | |
| 43 | 43 | // Ok now get all urls from this model and point them to the new records |
| 44 | 44 | foreach (UrlRecord::getByModel($manager->model()) as $urlRecord) { |
| 45 | - if ($targetRecord = $targetRecords->first(function ($record) use ($urlRecord) { |
|
| 45 | + if ($targetRecord = $targetRecords->first(function($record) use ($urlRecord) { |
|
| 46 | 46 | return ($record->locale == $urlRecord->locale && !$record->isRedirect()); |
| 47 | 47 | })) { |
| 48 | 48 | $urlRecord->redirectTo($targetRecord); |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | ->guard('archive') |
| 55 | 55 | ->archive(); |
| 56 | 56 | |
| 57 | - return redirect()->to($manager->route('index'))->with('messages.success', $manager->details()->title .' is gearchiveerd.'); |
|
| 57 | + return redirect()->to($manager->route('index'))->with('messages.success', $manager->details()->title.' is gearchiveerd.'); |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | public function unarchive($key, $id) |
@@ -65,6 +65,6 @@ discard block |
||
| 65 | 65 | ->guard('unarchive') |
| 66 | 66 | ->unarchive(); |
| 67 | 67 | |
| 68 | - return redirect()->to($manager->route('index'))->with('messages.success', $manager->details()->title .' is hersteld.'); |
|
| 68 | + return redirect()->to($manager->route('index'))->with('messages.success', $manager->details()->title.' is hersteld.'); |
|
| 69 | 69 | } |
| 70 | 70 | } |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | ->guard('publish') |
| 25 | 25 | ->publish(); |
| 26 | 26 | |
| 27 | - return redirect()->back()->with('messages.success', $manager->details()->title .' is gepubliceerd. <a href="' . $manager->assistant('publish')->previewUrl() . '" target="_blank">Bekijk de pagina online</a>.'); |
|
| 27 | + return redirect()->back()->with('messages.success', $manager->details()->title.' is gepubliceerd. <a href="'.$manager->assistant('publish')->previewUrl().'" target="_blank">Bekijk de pagina online</a>.'); |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | public function draft(Request $request, $key, $id) |
@@ -40,10 +40,10 @@ discard block |
||
| 40 | 40 | $urlRecord = UrlRecord::find($id); |
| 41 | 41 | |
| 42 | 42 | if (!$urlRecord) { |
| 43 | - return response()->json(['No url record found by id ' . $id], 500); |
|
| 43 | + return response()->json(['No url record found by id '.$id], 500); |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | - if (! $urlRecord->isRedirect()) { |
|
| 46 | + if (!$urlRecord->isRedirect()) { |
|
| 47 | 47 | return response()->json(['Url with id '.$id.' is not a redirect'], 500); |
| 48 | 48 | } |
| 49 | 49 | |
@@ -70,13 +70,13 @@ discard block |
||
| 70 | 70 | if ($urlRecord->isRedirect()) { |
| 71 | 71 | return 'Deze link bestaat reeds als redirect. Deze redirect zal bijgevolg worden verwijderd.'; |
| 72 | 72 | } |
| 73 | - return 'Deze link bestaat reeds. Kies een andere of <a target="_blank" href="' . $this->editUrlOfExistingModel($urlRecord) . '">pas de andere pagina aan</a>.'; |
|
| 73 | + return 'Deze link bestaat reeds. Kies een andere of <a target="_blank" href="'.$this->editUrlOfExistingModel($urlRecord).'">pas de andere pagina aan</a>.'; |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | private function editUrlOfExistingModel(UrlRecord $urlRecord): string |
| 77 | 77 | { |
| 78 | 78 | $model = Morphables::instance($urlRecord->model_type)->find($urlRecord->model_id); |
| 79 | 79 | |
| 80 | - return app(Managers::class)->findByModel($model)->route('edit') . '#inhoud'; |
|
| 80 | + return app(Managers::class)->findByModel($model)->route('edit').'#inhoud'; |
|
| 81 | 81 | } |
| 82 | 82 | } |