laravel-5.1

    0热度

    2回答

    当我发现我的框架/会话文件夹成为笨重后。因为laravel创建会话上的文件每个请求。我正在使用laravel 5.1。我不想要所有请求的会话。或者我想在每次请求完成后自动删除框架/会话文件。我尝试了session-> flash。但文件仍然存在。 我试过$ request-> session() - > flush();但它不是从框架/ sessins目录中删除文件 我想避免这种情况只有卷曲请求。

    1热度

    1回答

    我正在使用RESTful资源控制器并且更新功能无法正常工作。 如果产生这样的链接,并没有任何反应 http://localhost:8000/medication/3?_token=Sv0mblJUcWppsO6roWiXOzZzcFOqlgMBIzJoy3HW&medicine=a&dosage=a&howOften=aaa&forWhat=a&doctor=a&vaccination=a&sh

    4热度

    1回答

    我有这样的SQL查询与Laravel查询生成器 $this->candidate->select('candidates.*', 'candidates.id as candidate_id', 'mj.interviewScheduledDate') ->join('candidates_positions', 'candidates_positions.candidate_id'

    0热度

    2回答

    如果我这样做在Laravel 5.1 Route::get('test_email', function(){ Mail::raw( "", function ($mail) { $mail->from('[email protected]'); $mail->to('[email protected]', 'test');

    1热度

    1回答

    RouteCollection.php线161添加以下航线routes.php: Route::get('/', function() { return 'Hello World'; }); Route::get('user/{id}', function ($id) { return 'User '.$id; }); Route::post('foo/bar',

    0热度

    1回答

    添加外键在laravel迁移文件我有以下代码: Schema::table('stripe_customers', function (Blueprint $table) { $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); }); “USER_ID”是表“st

    1热度

    3回答

    我想在Laravel 5 用于重命名索引在以前的迁移柱名为a表创建像这样: $table->unsignedInteger('foo')->index('blah'); 我要重命名的索引,以便它使用默认的Laravel符号。 即我想将blah索引重命名为a_blah。 我知道如何重新命名一个正常的列,就像这样: $table->renameColumn('from', 'to'); 但文件

    0热度

    1回答

    我想在Laravel迁移运行下面的原始SQL语句来重命名索引: RENAME INDEX offer_venue_id_fk_idx TO offers_venue_id_index 我怎样才能做到这一点?

    0热度

    1回答

    我有一个模型Foo,其中包含hasMany与Bar的关系。 我有类似以下的查询: $r = Foo::with(['bar' => function($query) { $query->where('someProp', '=', 10); })->get() 不过,我只想返回Foo对象,如果项目有Bar对象满足查询。 我知道,你可以做这样的事情: $r = Foo::has('b

    3热度

    1回答

    错误:无法创建 “HTTP:/本地主机/购物/公/ src目录/ IMG /” 目录 my code : $imageName = $product->id . '.' . $request->file('image')->getClientOriginalExtension(); $request->file('image')->move( url().'