laravel-5

    0熱度

    1回答

    我是新手laravel我正在使用updateorcreate模型。但是這顯示錯誤MassAssignmentException end_time在模型任務時間我正在使用protected $ guarded = array();這是我在做什麼。 $endtask= Tasktimelog::updateOrCreate( [ 'task_id' => $taskid,

    2熱度

    1回答

    我需要驗證json文件,只有當用戶從瀏覽器上傳,但不起作用,它適用於當我結合txt文件。 工作代碼源 $this->validate($request, [ // check validtion for json 'dataset_type' => 'required|mimes:json,txt' ]); 我需要的是驗證JSON文件只下面的代碼不

    0熱度

    2回答

    每次我打提交按鈕我得到這個問題 ReflectionException 類UserController中不存在 <?php namespace app\Http\Controllers; use App\User; use Illuminate\Http\Request; class UserController extends Controller {

    0熱度

    1回答

    試圖向現有集合添加新屬性並訪問該屬性。 我需要的是這樣的: $text = Text::find(1); //Text model has properties- id,title,body,timestamps $text->user = $user; 並獲得通過,$text->user用戶。 探索文檔和SO,我發現put, prepend, setAttribute方法做到這一點。 $c

    2熱度

    1回答

    我想在Laravel 5.5中使用tFPDF。我添加了作曲家包,然後我試圖輸出它根據docs,但沒有任何工作。 我試圖輸出直接到瀏覽器: Route::get('/test',function(){ $pdfLibrary = new tFPDF\PDF(); $pdfLibrary->AddPage(); $pdfLibrary->AddFont('Deja

    0熱度

    1回答

    我正在Laravel 5中開發一個Web應用程序,我基本上從控制器方法中的數據庫中獲取數據,並將其傳遞給表中的視圖。當我請求該頁面時,有時完整的數據不會顯示。就像它會隨機丟失幾行,它偶爾會偶爾發生,有時候在瀏覽器中顯示純html,有時也會顯示腳本,但是當我刷新頁面時,它會正確顯示頁面上的完整信息。 這背後有什麼可能的原因?

    1熱度

    4回答

    我正在使用「laravel/socialite」:「^ 3.0」,來登錄facebook。但它表明 錯誤 Type error: Argument 1 passed to Laravel\Socialite\SocialiteManager::formatRedirectUrl() must be of the type array, null given, called in /var/www/

    1熱度

    1回答

    設置頁面之前額外的屬性在我PageTemplates.php我有一個領域是這樣的: $this->crud->addField([ 'name' => 'adres', 'label' => 'Adres', 'type' => 'address', 'fake' => true, ]); 現在,我想也保存的該緯度和經度他們給的地址(如果可以找到的話)

    0熱度

    1回答

    我有電子郵件模板類似下面 @component('mail::message') # You're invited for APP <strong>{{ $fromName }}</strong> invited you for App. {{ $messageBody }} <?php switch ($type): case App\Mail\InviteEmail::

    0熱度

    1回答

    請給我一個例子,將文件存儲到laravel 5.5中的AWS S3。 我已經使用AWS憑證配置了文件系統文件。 只見功能 Storage::put('file.jpg', $contents); ,但不知道是什麼,第二個參數是 filesystem.php文件被作爲 return [ 'default' => env('FILESYSTEM_DRIVER', 'local'),