lumen-5.2

Lumen installation error

人盡茶涼 提交于 2020-01-13 19:46:11
问题 I am trying to install lumen with composer so I used the command below composer create-project --prefer-dist laravel/lumen api But, for some reason I am getting this error before even doing anything, just visiting the public folder. Sorry, the page you are looking for could not be found. 1/1 NotFoundHttpException in RoutesRequests.php line 442: in RoutesRequests.php line 442 at Application->handleDispatcherResponse(array('0')) in RoutesRequests.php line 381 at Application->Laravel\Lumen

Lumen - Missing commands

安稳与你 提交于 2020-01-05 17:00:50
问题 I have a problem with running Lumen's Artisan. There are most of the commands missing. For an example if I write php artisan routes , I get following error: Command "routes" is not defined. Below is an example of output that I get by typing php artisan. Laravel Framework version Lumen (5.2.5) (Laravel Components 5.2.*) Usage: command [options] [arguments] Options: -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi

Just installed Lumen and got NotFoundHttpException

会有一股神秘感。 提交于 2019-12-21 07:35:42
问题 I'm searching for a solution ... it's getting so frustrating. After a fresh installation of Lumen by Laravel, I simply can't access the "/" route. When I try to, it throws an error: NotFoundHttpException in RoutesRequests.php line 443: in RoutesRequests.php line 443 at Application->handleDispatcherResponse(array('0')) in RoutesRequests.php line 380 at Application->Laravel\Lumen\Concerns\{closure}() in RoutesRequests.php line 629 at Application->sendThroughPipeline(array(), object(Closure)) in

How to use multiple database in Lumen

依然范特西╮ 提交于 2019-12-21 02:46:21
问题 We've using Lumen for building API's , Now we need to access multiple databases. Currently using .env for database config but unable to found the way to multiple databases in .env where we need to read 2nd connection ... 回答1: First, you'll need to configure your connections. If you don't already have one you'll need to create a config directory in your project and add the file config/database.php . It might look like this: <?php return [ 'default' => 'accounts', 'connections' => [ 'mysql' =>

Why has the artisan serve command been removed from Lumen 5.2?

微笑、不失礼 提交于 2019-12-20 09:47:07
问题 Please. Does anybody know why Lumen's team removed the command php artisan serve ? That command's very helpful. 回答1: I don't speak for Taylor, but my guess is that his reasoning is that a given microframework should not know - or care - about the server that's running it. A microframework should just assume that it's going to work, and leave it to the developer to figure out which tools are best to make that happen. Laravel is different, in that it offers a more "complete" - and highly

Lumen + Dingo + JWT is not instantiable while building

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-13 12:11:03
问题 I am trying to get a basic working foundation for a Lumen + Dingo Rest API, but I am not able to figure out how to peace is all together. Lumen is working fine, but when I try to add Dingo I get all sorts of errors. From the Dingo documentation I read: Once you have the package you can configure the provider in your config/api.php file or in a service provider or bootstrap file. 'jwt' => 'Dingo\Api\Auth\Provider\JWT' or app('Dingo\Api\Auth\Auth')->extend('jwt', function ($app) { return new

Can't use socialite on lumen 5.2

点点圈 提交于 2019-12-13 08:34:12
问题 Here is my config socialite for lumen but I got error: Fatal error: Call to a member function set() on null Any idea? my AuthController namespace App\Http\Controllers; use Socialite; class AuthController extends Controller { public function redirectToProvider() { return Socialite :: driver('github')->redirect(); } public function handleProviderCallback() { $user = Socialite :: driver('github')->user(); dd( $user ); } } my Route.php $app->get('auth/github', 'AuthController@redirectToProvider')

Lumen custom authentication without Eloquent

最后都变了- 提交于 2019-12-11 10:14:21
问题 After posting a question Lumen + Dingo + JWT is not instantiable while building about Lumen and Dingo here in SO I got a nice detailed answer on how to set up such a system. Within his setup there is a small authentication example, which uses Eloquent. Now we are loading an custom framework within Lumen, which has its own models etc, and has its own database connection etc. What I can not seen to figure out is how to completely remove Eloquent, and do the authentication using our own

Target [Laravel\Socialite\Contracts\Factory] is not instantiable

↘锁芯ラ 提交于 2019-12-10 14:19:30
问题 I am using laravel lumen 5.2. Target [Laravel\Socialite\Contracts\Factory] is not instantiable. I came across this error when trying to get Laravel to login with Twitter using the Socialite package. Work already done: A) In config\app.php 1. Laravel\Socialite\SocialiteServiceProvider::class 2. 'Socialite' => Laravel\Socialite\Facades\Socialite::class I followed this : http://goodheads.io/2015/08/24/using-twitter-authentication-for-login-in-laravel-5/ 回答1: What helped me is writing use

Lumen installation error

倾然丶 夕夏残阳落幕 提交于 2019-12-06 07:02:33
I am trying to install lumen with composer so I used the command below composer create-project --prefer-dist laravel/lumen api But, for some reason I am getting this error before even doing anything, just visiting the public folder. Sorry, the page you are looking for could not be found. 1/1 NotFoundHttpException in RoutesRequests.php line 442: in RoutesRequests.php line 442 at Application->handleDispatcherResponse(array('0')) in RoutesRequests.php line 381 at Application->Laravel\Lumen\Concerns{closure}() in RoutesRequests.php line 624 at Application->sendThroughPipeline(array(), object