laravel-5.5

    0熱度

    1回答

    我有一個控制器ManageController無消息: public function index() { return redirect()->route('manage.dashboard'); } public function dashboard() { return view('admin.manage.dashboard'); } 和路線: Auth

    0熱度

    1回答

    City.php public function municipal_districts() { return $this->hasMany('App\Models\Municipal_district'); } Municipal_district.php public function province() { return $this->belongsTo('A

    0熱度

    1回答

    我不能每天或每小時運行時刻表,窗戶,... 這個代碼不起作用 $schedule->call(function() { \DB::table('test')->delete(); // or anything else })->everyFiveMinutes(); // tested : ->hourly() | ->daily() php artisan schedule:ru

    -1熱度

    1回答

    我使用此查詢: $clients = Client::with("types", "results")->where(function ($query) use ($issued, $mode, $request) { if (($request->get("filter"))) { $query->where('issued', $issued); }

    2熱度

    1回答

    我需要獲取以所需字母開頭的所有文件,我試圖使用->where篩選器,並添加'like'作爲運算符,但通配符不起作用。 $files = File::files(storage_path($id_files)); $files = collect($files); $files->transform(function ($item, $key){ $item-

    0熱度

    1回答

    我有以下查詢: $updated = ResultTest::whereIn("client_id", $request->id)->update(array("mode" => 1)); 現在返回$update標誌(1 | 0),如果行已更新。如何獲取字段數組client_id而不是布爾值?

    1熱度

    2回答

    我正在研究一個6年前的ERP系統,它是在原始PHP中開發的,它保持沒有OOP或任何框架的程序編碼結構。 最後我們的管理層決定用升級的技術重新編寫應用程序。我們將在Laravel框架中編寫應用程序。數據庫將是Oracle和Mysql兩者。在前端,我們將使用Angular 4. 混淆是我應該使用Angular 4進行前端請求處理和數據綁定?或者我應該去用JavaScript/Jquery。最近幾天我在

    0熱度

    1回答

    在laravel文檔中,我看到我可以將參數傳遞給路由中間件,但我有一個全局中間件,可以在每個http請求上運行。我需要將一個變量傳遞給這個全局中間件。有可能嗎?或者我必須使用路由中間件,並明確定義每條路由上的中間件? 這裏是我的簡單的測試代碼 Route::get('{lang}/product', function($lang){ return view('langtest'); }

    2熱度

    1回答

    我有數據進來通過AJAX後是這樣的: data: 0: {type: 'percent', amount: 10,…} 1: {type: 'percent', amount: 200,…} 正如你所看到的,數組中的最後一個項目是一個問題。如果類型是百分比,且數量超過100,則驗證應該失敗。 我使用下面的函數來驗證請求: public function validateRe

    2熱度

    3回答

    我想更改任務的狀態以完成。我在數據庫中有一個status_id列,1表示完成。我想點擊按鈕到STATUS_ID更改爲1 我的路線 Route::patch('/tasks/completed/{Task}', '[email protected]')->name('completedUpdate'); 我的按鈕 <form action="{{ route('completedUpdate',