All Projects → afolson → lumen-tutorial

afolson / lumen-tutorial

Licence: other
API for Lumen-related tutorial sessions

Programming Languages

PHP
23972 projects - #3 most used programming language
ApacheConf
554 projects

Lumen Tutorial

This is a sample project for a tutorial session that I give. Feel free to have a look around but note that there are some blanks you need to fill.

Coming from Laravel

If you're coming from Laravel, here are some differences you'll notice:

  • In order to use a .env file to load env vars, you will need to uncomment the Dotenv::load() method in bootstrap/app.php.
  • php artisan has a limited command set, and you'll need to generate your own key as there's no key:generate.
  • Enable Eloquent by uncommenting $app->withEloquent() in bootstrap/app.php.
  • The router used is different from that of Laravel.

Getting Started

If you want to install Lumen from scratch and follow along, follow the instructions here: http://lumen.laravel.com/docs/installation

When you're ready to create a new project, issue the following command lumen new lumen-api

If you're using Homestead, this should be no different for you than a Laravel app.

If you're developing locally, you should know that the artisan command is missing the serve command. I recommend that you use PHP's built in web server: php -S 127.0.0.1:8080 -t public/

License

The Lumen framework is open-sourced software licensed under the MIT license

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].