我正在运行的宅基地和laravel 5.5 虚拟箱homestead-7正在运行和我的laravel本地页面加载。 当我更改我的网站中的任何代码时,我的视图不会更新。但链接已正确设置到我的本地网站。Laravel Homestead Site不更新
Homestead.yaml
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/Documents/Development/Medifaktor/MFS
to: /home/vagrant/Code/MFS
sites:
- map: local.medifaktor
to: /home/vagrant/Code/MFS/public
databases:
- homestead
variables:
- key: APP_ENV
value: local
# blackfire:
# - id: foo
# token: bar
# client-id: foo
# client-token: bar
# ports:
# - send: 93000
# to: 9300
# - send: 7777
# to: 777
# protocol: udp
例如:我在这个页面更改标题标签,但是当我刷新我的本地托管的网站,没有在视图改变
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Test</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.16.1/axios.js"></script>
<link rel="stylesheet" href="{!! asset('css/vendor.css') !!}" />
<link rel="stylesheet" href="{!! asset('css/app.css') !!}" />
</head>
<body class="gray-bg">
<div id="wrapper">
<!-- Main view -->
@yield('content')
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.3.0/vue.js"></script>
<script src="{!! asset('js/app.js') !!}" type="text/javascript"></script>
<script src="{!! asset('js/main.js') !!}" type="text/javascript"></script>
</body>
</html>
当我打开文件夹映射到的文件,我看到了更改。当我在浏览器中刷新时,没有任何反应。 VM正在运行并显示没有错误。
我装:
vagrant box add laravel/homestead
cd ~
git clone https://github.com/laravel/homestead.git Homestead
cd Homestead
git checkout v6.5.0
bash init.sh
vagrant up
东西,我注意到:过去我用了宅基地作为命令。所有宅基地命令不再存在。因此,我在Homestead文件夹中使用了流浪汉。虚拟机正在运行,但仍然没有发生变化。
然后我改变了标题为“Test1的”
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Test1</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.16.1/axios.js"></script>
<link rel="stylesheet" href="{!! asset('css/vendor.css') !!}" />
<link rel="stylesheet" href="{!! asset('css/app.css') !!}" />
</head>
<body class="gray-bg">
<div id="wrapper">
<!-- Main view -->
@yield('content')
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.3.0/vue.js"></script>
<script src="{!! asset('js/app.js') !!}" type="text/javascript"></script>
<script src="{!! asset('js/main.js') !!}" type="text/javascript"></script>
</body>
</html>
我在源文件夹的变化看。刷新,不会改变任何东西。
的web.php:
Route::group(['domain' => 'local.medifaktor', 'namespace' => 'MFS'], function() {
// ADMINISTRATION
Route::group(['prefix' => 'admin', 'namespace' => 'admin'], function() {
Route::get('/dashboard', '[email protected]')->name('admin.dashboard'); //->middleware('role:superadministrator|administrator|supervisor');
});
// INCIDENTS
Route::get('/', 'Incidents\[email protected]');
Route::get('/incidents', 'Incidents\[email protected]')->name("home");
// MFUSERS
Route::get('/register', 'Authentication\[email protected]');
Route::get('/login', 'Authentication\[email protected]');
// Route::get('/incidents/{incidents}', 'MFS\[email protected]');
// GIS
Route::get('/gis', 'MFS\[email protected]')->name("minor");
});
我不知道有关环境的宅基地,但很想知道它做什么。你使用Composer吗? –
是的,我确实使用作曲家。所有似乎都很好,除了我的虚拟机设置 – sesc360
你尝试过'php artisan cache:clear'吗? –