laravel-5.3相关内容
我正在尝试上传4个输入文件中的文件,我从中获得了解决方案 此处但是问题出在数据库的所有字段中最后上传的file4输入文件 以我的刀片形式 {!! Form::file('file1', null,['class'=>'form-control']) !!} {!! Form::file('file2', null,['class'=>'form-control']) !!} {!! F
..
我在这里阅读: https://laravel.com/docs/5.3/authorization #writing-policies 我试图喜欢这个 我的收藏夹政策是这样的:
..
我使用这个: https://github.com/rinvex/repository 我的查询是这样的: $query = $this->store_repository ->join('favorites', function ($join) { $join->on('stores.id', '=', 'favorites.favoritable_id')
..
我创建了一个通知,告知我要将模型传递给: class NewMessage extends Notification implements ShouldQueue { use Queueable; protected $message; public function __construct(Message $message) { $thi
..
是否可以在控制器功能中使用叶片@if条件.这是我的PublicController功能 public function tourBanner($country){ @if( $country == 'country1') background-image:url({{ asset('images/inside8.jpg') }});
..
如何验证文件数量. 我发现了很多方法,并且阅读了很多主题.但是我找不到这个结果. 我只找到验证文件的大小. 'files' => 'size:2560|max:2560' 所有这些仅文件大小. 我怎么知道文件数量. 解决方案 如果文件是数组,则 max 检查数组长度. 'files' => 'max:5' //maximum number of files: 5 'fil
..
我发现with函数的异常行为使关系超载.我有Product和Deal关系,例如Product belongsTo() Deal(通过deals表中的product_id).现在,当我尝试出售所有产品时: Product::with(['deal' => function($query) { $query->whereDate('ends_at', '>', Carbon::now()
..
我的proses.blade.php是这样的:
{!! csrf_field() !!} ... 我的routes \ web.php是这样的: Route::resource('perekamans', 'PerekamanC
..
我是laravel的新手,正在努力弄清这一点.我正在尝试按日期排序帖子,并使用分页器.每当我移除分页器时.它按日期排序,但是我想按ID将其重新添加到订单中? 我的模特 class Post extends Model { // protected $dates = ['date']; } 我的控制器方法 public function show() {
..
我正在使用MongoDB库 https://github.com/jenssegers/laravel-mongodb Laravel 5.3.28中的version 3.1.0-alpha我在MongoDB中有两个集合,我想与它们建立hasMany关系.意味着每个员工执行许多任务.我已使用参考并在任务集合中添加了employee_ids. 下面是我的代码: MongoDB: 第
..
这是关于Laravel 5.3.6 我能够成功登录,并且可以在登录后检查Auth User.我可以显示Auth::guard()具有当前用户对象的确切位置.下面是详细信息. 转到登录控制器 转到AuthenticatesUsers特质 转到sendLoginResponse方法.用户已成功通过身份验证,因此已成功到达此处. 在这里我可以检查$this->guard()->us
..
我使用Laravel 5.3 我的控制器是这样的: auth()->user()->notify(new ConfirmOrder($invoice)); 我的通知是这样的:
..
我使用laravel 5.3 我这样制作routes/channels.php:
..
首先,我已经检查了其他控制器(而不是资源控制器)中的会话是否运行良好,但是当我在资源控制器中执行该操作时,获取会话的代码无法正常工作. 这是我的资源控制者
..
我有2个组成部分 组件1,名称为SearchResultVue.vue组件 该组件是这样的: ...
..
尽管我在HTML文件中使用的是{{ csrf_field() }},但仍然显示POST http://localhost:8000/add_user 500 (Internal Server Error) 这是我的代码 $.ajax({ url:"/add_user", type: 'post', data: {_
..
我正在使用Laravel5.在我的OrganisationsController中,我有一个方法addItem public function addItem(Request $request) { $rules = array( 'nom' => 'required', ); // for Vali
..
我有一个 index.js 文件: import来自'./components/MyComponent.vue'的MyComponent; module.exports = MyComponent; 我想将此发布为 npm package 所以我可以通过使用这个组件npm install my-component 当我尝试通过导入组件来测试已编译的js文
..
我正在尝试使用带有新Laravel 5.3项目的ajax登录我的用户。 我已经生成了auth路由,这些路由已添加到我的网站中。 php: Auth :: routes(); 我有一个带有电子邮件,密码输入和csrf字段的html表单。然后我也有这个javascript文件: $(“form.login”)。submit(function(e){ e.pr
..
在5.3之前的Laravel项目中,我使用了这样的脚本标签来使用Vue.js: 然后我会创建一个特定于该页面的Vue实例,如下所示: new Vue({ el:'#app', data:{ messag
..