artisan

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

Laravel - How to remove index.php from Laravel in windows xampp

最后都变了- 提交于 2019-12-14 02:59:25
问题 Problem: my routes not working except the root home page, I'm searching for two days to find a solution to this problem and what I found that I should change .htaccess file but solutions didn't fix any for my case, at first the url localhost/quotes/public was working well with me, but at some point I'm not sure what is it this issue showed up what I tried: create another route and I made sure that no routes are working only home route, still not working except home tried to change

php artisan optimize times out only on composer install

会有一股神秘感。 提交于 2019-12-13 13:12:10
问题 I'm running a laravel app on Azure. Things are moving in the right direction, composer install didn't use to work at all. Now however, the "php artisan optimize" command times out: However, running "php artisan optimize" separately is no problem at all: What could be the cause of this? Edit: Deleting the symfony-folder does not help, it is not present when I run the "Composer install"-command: Increasing the timeout-limit does not help either, I increased it in both azure and in the composer

artisan clear-compiled return error code 255

女生的网名这么多〃 提交于 2019-12-13 13:06:22
问题 When runnning composer install on my laravel project I get the error: Script php artisan clear-compiled handling the post-install-cmd event returned with error code 255 Any advice on what could be the issue? Note composer installs all the vendor packages. The full output is below: [user@some_path]$ composer update Loading composer repositories with package information Updating dependencies (including require-dev) Nothing to install or update Generating autoload files > php artisan clear

Artisan: Could not find driver

一世执手 提交于 2019-12-13 12:08:52
问题 I'm using Laravel last version: 3.2.1. When I run this on terminal: php artisan migration:install I have this error: could not find driver I made some searches on Google and on Laravel's Forum, nothing. EDIT I have activated the extension and this is what I have on phpinfo() --with-iconv' '--with-pdo-mysql=mysqlnd' '--with-pdo-pgsql=/opt/lampp/postgresql' '--with-pdo It looks like my pdo is set. Here is an image of my phpinfo() EDIT 2 I've made a little test: <?php try { $dbh = new PDO("mysql

PHPStorm: How to setup running terminal commands instead of trying open it

假装没事ソ 提交于 2019-12-13 04:45:14
问题 lately I start to learning Laravel using PHPStorm. Anyway I set up composer and all that stuff, but still have problem with one very annoying issue. Every time I type "composer update" or something similar that need to fire few commands "from under the hood" I receive popup saying: "Cannot find file" "/Application/.../optimize" - as an example of php artisan optimize It's the same for all commands that's in composer.json file: (...) "scripts": { "post-install-cmd": [ "php artisan clear

How to create a controller in a sub-folder when defining as a parameter?

筅森魡賤 提交于 2019-12-13 03:49:51
问题 I'm creating a project with Laravel and I'm aware that there is a way to create the migration and controller (with or without resources) along with the model with php artisan make:model ExampleModel -m -c -r . In my project I have models and controllers in sub-folders. I'm able to add the model and controllers to sub-folders when creating them separately ( php artisan make:model Models/example_model and same in controllers). But I don't know how to add the controllers to a sub-folder when

Object key value corrupted

落花浮王杯 提交于 2019-12-12 18:08:38
问题 Good day The following code is used in a Laravel framework to return data from our server: $ses = DB::connection('odbc') ->table('HBO.SM200T') ->where('USRPF1', '=', strtoupper(auth()->user()->name)) ->first(); But on one of my pc's it returns my data fine as below: {#780 ▼ +"WAGWRD": "VTER" +"PERSNR": "56846" +"STELS": "59" +"TAK": "324" +"BESKR": " " +"STVDAT": "99999999" +"TAALN": "2" +"USRPF1": "AV " +"USRPF2": " " } But on my new installation of Fedora 24 it returns as: {#783 ▼ +b"W\x00‚

Laravel Test | Mock object in Laravel Artisan Command

独自空忆成欢 提交于 2019-12-12 15:17:14
问题 I want to test my Laravel Artisan command. So I need to mock an object and stubs this mocked object methods. In my test, I cannot use the real SFTP environment. This is the handle() of my command: public function handle() { $sftp = new SFTP('my.sftpenv.com'); $sftp->login('foo', 'bar'); } I want to mock the SFTP in my test: $sftp = $this->createMock(SFTP::class); $sftp->expects($this->any())->method('login')->with('foo', 'bar'); $this->artisan('import:foo'); Running the test results in a

Laravel php artisan serve to mimic HTTPS

廉价感情. 提交于 2019-12-12 10:36:08
问题 I have been searching around to see if there is a way I can mock SSL for local development using Laravel's artisan to serve HTTPS with no luck. Is this possible and if so, how? I understand this is a very general question, but I am not seeing anything on this in searches. 回答1: You can use ngrok for that php artisan serve cd <path-to-ngrok> ./ngrok http localhost:8000 https://ngrok.com/ 回答2: Laravel uses the in-built PHP5.4 development server php -S (http://php.net/manual/en/features