laravel-5.1

    0熱度

    1回答

    我需要獲取用戶的前10天活動。在我的情況下,我只獲得了10個活動記錄,而不是之前的10天活動。 *我的代碼: $activity = $this->where('user_id', '=', $userId)->paginate(10); $activities = collect($activity->items())->groupBy(function($item) { retu

    4熱度

    1回答

    我試圖在Laravel 5.1中獲得neraby商店我有地理編碼解析器,caluclate coorinate。但是,我有與haversine公式問題。基本上我需要從表Aziende(商店)給出一個lat,long e類別通過低谷url,拿取附近的商店。 我嘗試使用此代碼: $dove = Input::get('dove'); $categoria_id = Input::get('i

    0熱度

    2回答

    我有這個問題,其中通過圖像從存儲獲得示出了在正確頁但控制檯顯示狀態碼404,如下 所示的圖像中我注意到一些奇怪的事情。 這種方法工作正常。 Route::get('/image/view','[email protected]'); public function display(Request $request){ $path = $request->path; $cac

    0熱度

    2回答

    //viewing tickets generated by them $user= Auth::user()->_id; $tickets = ticket::where(function ($query) use ($user) { $query->where('user', '=', $user); })->get(); //

    1熱度

    3回答

    我是laravel的新手,我嘗試將視圖中的值發佈到控制器。但我沒能獲得通過,因爲我得到錯誤說 FatalErrorException in routes.php line 26: Class 'registration' not found提交表格時 routes.php文件 Route::get('/', function() { return view('welcome'); })

    1熱度

    1回答

    I am following this tutorial每分鐘安排一項功能。以下是我在localhost上的代碼。 class Kernel extends ConsoleKernel { protected $commands = [ 'App\Console\Commands\Inspire', ]; protected function sche

    2熱度

    2回答

    我正在使用Laravel 5.1開發RESTful API。我的終端在郵差上正常工作。但是當我將它與前端集成時,它正在跟蹤錯誤。 XMLHttpRequest無法加載 http://ideahubapi.dev/api/v1/users/register。 請求的 資源上不存在「Access-Control-Allow-Origin」標頭。 原因'http://ideahubfront.dev'因

    1熱度

    2回答

    我有以下查詢,工作正常,並給出結果爲StatusType AddOnModel::with('StatusType')->get(); 但是,當我寫的下面,它不綁定StatusType記錄 AddOnModel ::select(\DB::Raw('A.AddOnID, A.AddOn, Count(R.AddOnID) as Total')) ->from('tblAddOn as A'

    2熱度

    1回答

    我的形式是像下面 <form method="POST" action="http://localhost:1234/Update" accept-charset="UTF-8"> <input name="_token" type="hidden" value="bVyYZGPprZKHab8sQXairqhtwszTeQ36LRhp9u2k"> <input type="h

    1熱度

    1回答

    我的應用程序是Laravel 5.1,手工調用方法在本地工作正常。但不適用於生產。 Artisan::call('db:seed', [ '--class' => 'ResetSeeder', '--force' => true ]); 這是我在控制器中的代碼。當我var_dump這個代碼在本地和生產;返回零(0)。但是本地是執行和生產not_execute。 我的數