Skip to content

Commit 388d2f2

Browse files
committed
Sorted buttons alphabetically
again...
1 parent 3bf1ed9 commit 388d2f2

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

app/Http/Controllers/UserController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function littlelinkhome(request $request)
8787
//Show buttons for add link
8888
public function showButtons()
8989
{
90-
$data['buttons'] = Button::select('name')->get();
90+
$data['buttons'] = Button::select('name')->orderBy('name', 'asc')->get();
9191
return view('studio/add-link', $data);
9292
}
9393

resources/views/studio/add-link.blade.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,15 @@
1717
<div class="form-group col-lg-8">
1818
<label for="exampleFormControlSelect1">Button*</label>
1919
<select class="form-control" name="button">
20+
<option> custom </option>
21+
<option> custom_website </option>
2022
@foreach($buttons as $button)
23+
@if (!in_array($button->name, ['custom', 'custom_website', 'heading', 'space']))
2124
<option> {{ $button->name }} </option>
25+
@endif
2226
@endforeach
27+
<option> heading </option>
28+
<option> space </option>
2329
</select>
2430
<br>
2531
<label>* Required fields</label><br>

0 commit comments

Comments
 (0)