在托管中 Laravel 提醒
Alertify in Laravel in hosting
他们可以帮助我,我在 Laravel 中有一个项目,在 Localhost 中一切正常,但现在它在服务中,alertify 不起作用并且不让视图 return,如果我删除 alertify 一切正常(sql 行,boostrap,路由,没有 alertify 一切正常)
这是 Alertify 的功能之一,但它们不能像上面解释的那样工作:
public function create(CreateUserRequest $request)
{
$user = new User($request->all());
$user->password = bcrypt($request->get('password'));
$user->save();
alertify()->success('USER ' . $user->name . ' CREATED.')
->position('bottom right')
->delay(6000);
return redirect()->route('users_path');
}
确保您添加了 alertify 库
composer require odannyc/laravel-alertify
或
<script src="https://cdn.rawgit.com/alertifyjs/alertify.js/v1.0.10/dist/js/alertify.js"></script>
并尝试
alertify()->success('USER WAS CREATED.')->delay(6000)->position('bottom right');
如果以上行有效,则检查 $user->name
这有数据 (dd($user->name)
)
他们可以帮助我,我在 Laravel 中有一个项目,在 Localhost 中一切正常,但现在它在服务中,alertify 不起作用并且不让视图 return,如果我删除 alertify 一切正常(sql 行,boostrap,路由,没有 alertify 一切正常)
这是 Alertify 的功能之一,但它们不能像上面解释的那样工作:
public function create(CreateUserRequest $request)
{
$user = new User($request->all());
$user->password = bcrypt($request->get('password'));
$user->save();
alertify()->success('USER ' . $user->name . ' CREATED.')
->position('bottom right')
->delay(6000);
return redirect()->route('users_path');
}
确保您添加了 alertify 库
composer require odannyc/laravel-alertify
或
<script src="https://cdn.rawgit.com/alertifyjs/alertify.js/v1.0.10/dist/js/alertify.js"></script>
并尝试
alertify()->success('USER WAS CREATED.')->delay(6000)->position('bottom right');
如果以上行有效,则检查 $user->name
这有数据 (dd($user->name)
)