Question: I want to load one of the many stylesheets depending on the `localStorage` item value:

```
<link rel="" href="assets/css/theme-dark.css" data-toggle="theme" data-theme-mode="dark">
<link rel="" href="assets/css/theme.css" data-toggle="theme" data-theme-mode="light">

<script>
  var themeMode = localStorage.getItem('themeMode');
  var themeFile = document.querySelector('[data-toggle="theme"][data-theme-mode="' + themeMode + '"]');

  themeFile.rel = 'stylesheet';
</script>

```

The code above does work, however the code inside the `<script></script>` tag doesn't seem to fire unless all of the page content is loaded which means that I first see all of the page content unstyled before the stylesheet gets applied. What I want is to get rid of that "flash" effect and make the correct stylesheet apply immediately like it had the `rel="stylesheet"` attribute from the very beginning.

Answer: 
If you pass the URL of the route then use url() method 

```
action="{{ url('/member/import-single-trades') }}"

```

And if you pass the route name then use route() method

```
action="{{ route('member.add-single-trade.import-excel.import_fields') }}"

```
web.php

```
Route::get('profile','ProfileController@profile')->name('profile');
Route::post('profile','ProfileController@update_profile')->name('profile');

profile.blade.php
  <form enctype="multipart/form-data" action="{{ url('admin/profile') }}" method="POST" class="form-horizontal" id="profile_frm">

```