lumen

    1熱度

    1回答

    無論出於何種原因,我的AuthServiceProvider已停止工作。它看起來像傳遞給viaRequest閉包的$ request參數沒有看到請求輸入。如果我將帶有「access_token」鍵的JSON發送給我的任何端點,並在閉包中嘗試var_dump,它只會返回null。下面是啓動方法的代碼: public function boot() { $this->app['auth']

    1熱度

    1回答

    我正在使用Lumen和Dingo API構建API。我的註冊功能會檢查指定的電子郵件是否已經存在。 如果電子郵件已存在於數據庫中,則使用Dingo API助手返回錯誤響應。 Dingo\Api\Routing\Helpers isEmailTaken功能: private function isEmailtaken($email) { $userExists = User::wher

    -1熱度

    1回答

    我正在使用Laravel 5.4。我有所有表中已registerId 我有兩個情況15桌,其中 1.I需要從所有表 2.another情況是基於registerId 檢索所有數據我一直在使用follwoing方法 $data=[]; $data['table1']=ModelName::get(); $data['table2']=ModelName::get(); $data['table

    0熱度

    2回答

    這是我的路線: $app->group(['prefix' => 'book/'], function ($app) { $app->get('/','[email protected]'); //get all the routes $app->post('/','[email protected]'); //store single route $app->ge

    0熱度

    1回答

    我們使用Lumen構建API並創建了一些測試用例。 所有測試用例都能正常工作,但我們希望恢復測試用例所做的所有更改。 是否有任何方法來恢復流明中的所有變化。 測試案例: class PostTest extends TestCase { /** * Test create post * * @return void */ public

    0熱度

    1回答

    從來就通過工匠 public function up() { Schema::create('log', function (Blueprint $table) { $table->increments('id'); $table->string('priority'); $table->string('level'); $table->

    0熱度

    2回答

    我一直試圖從角度發佈數據到php整天,但我感覺相當卡住。 這是角度控制我的方法: function submit() { var JSONObject = { "name":$rootScope.name, "surname":$rootScope.surname, "email":$rootScope.email, "revi

    0熱度

    2回答

    我希望我的類別列表在返回給用戶時格式不錯。我從數據庫得到的是: [ { "id": 1, "name": "pet", "parent_id": null }, { "id": 2, "name": "page", "parent_id": null }, { "id": 3, "name": "dog",

    0熱度

    1回答

    使用Lumen Framework 5.4,我試圖將Log::info('etc')寫入單獨的文件storage/logs/info.log。然而,我發現的代碼將日誌級別信息和以上的日誌記錄到單獨的文件中,而我只想將信息日誌級別記錄到我的自定義文件中。 在bootstrap/app.php: $app->configureMonologUsing(function($monolog) {

    1熱度

    1回答

    jsondecode我有一個索引航線http://localhost/index 我需要幫助創建jQuery的AJAX從URL http://localhost/mylist獲取JSON數據和格式化JSON數據,以顯示它作爲一個HTML表格。 這是我在Laravel 2路 Route::get('index', function() { return view('index'); });