mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-06-22 13:01:31 +02:00
Move appSettings generation from blade template to controller
This commit is contained in:
parent
ecc7447980
commit
6a694280cd
@ -13,6 +13,8 @@ class SinglePageController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
return view("landing");
|
$appSettings = \Illuminate\Support\Facades\DB::table('options')->pluck('value', 'key')->toJson();
|
||||||
|
|
||||||
|
return view("landing")->with('appSettings', $appSettings);;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
<app></app>
|
<app></app>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var appSettings = @json(\Illuminate\Support\Facades\DB::table('options')->pluck('value', 'key')->toArray(), JSON_PRETTY_PRINT)
|
var appSettings = {!! $appSettings !!}
|
||||||
</script>
|
</script>
|
||||||
<script src="{{ mix('js/app.js') }}"></script>
|
<script src="{{ mix('js/app.js') }}"></script>
|
||||||
<script src="{{ mix('js/locales.js') }}"></script>
|
<script src="{{ mix('js/locales.js') }}"></script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user