Laravel

Laravel TutorialChange default routing behaviour in Laravel 5.2.31 +CustomException class in LaravelDeploy Laravel 5 App on Shared Hosting on Linux ServerLaravel ArtisanLaravel AuthenticationLaravel AuthorizationLaravel Blade TemplatesLaravel CashierLaravel CollectionsLaravel Common Issues & Quick FixesLaravel ConstantsLaravel ControllersLaravel Cron basicsLaravel Cross Domain RequestLaravel Custom Helper functionLaravel DatabaseLaravel Database MigrationsLaravel Database SeedingLaravel Directory StructureLaravel DockerLaravel EloquentLaravel Eloquent : RelationshipLaravel Eloquent: Accessors & MutatorsLaravel Eloquent: ModelLaravel Error HandlingLaravel Events and ListenersLaravel Filesystem / Cloud StorageLaravel Form Request(s)Laravel Getting started with laravel-5.3Laravel HelpersLaravel HTML and Form BuilderLaravel InstallationLaravel Installation GuideLaravel Introduction to laravel-5.2Laravel Introduction to laravel-5.3Laravel lumen frameworkLaravel Macros in Eloquent RelationshipLaravel MailLaravel MiddlewareLaravel ObserverLaravel PackagesLaravel PaginationLaravel Permissions for storageLaravel PoliciesLaravel QueuesLaravel RequestsLaravel Route Model BindingLaravel RoutingLaravel SeedingLaravel ServicesLaravel SocialiteLaravel Task SchedulingLaravel TestingLaravel Token Mismatch Error in AJAXLaravel use fields aliases in EloquentLaravel Useful linksLaravel ValetLaravel ValidationMultiple DB Connections in LaravelNaming Files when uploading with Laravel on WindowsRemove public from URL in laravelSparkpost integration with Laravel 5.4



Laravel lumen framework

From WikiOD

Getting started with Lumen[edit | edit source]

The following example demonstrates using Lumen in WAMP / MAMP / LAMP environments.

To work with Lumen you need to setup couple of things first.

Assuming you have all these three components installed (at least you need composer), first go to your web servers document root using terminal. MacOSX and Linux comes with a great terminal. You can use git bash (which is actually mingw32 or mingw64) in windows.

$ cd path/to/your/document/root

Then you need to use compose to install and create Lumen project. Run the following command.

$ composer create-project laravel/lumen=~5.2.0 --prefer-dist lumen-project
$ cd lumen-project

lumen*app in the code above is the folder name. You can change it as you like. Now you need to setup your virtual host to point to the path/to/document/root/lumen-project/public folder. Say you mapped http://lumen-project.local to this folder. Now if you go to this url you should see a message like following (depending on your installed Lumen version, in my case it was 5.4.4)-

Lumen (5.4.4) (Laravel Components 5.4.*)

If you open lumen-project/routers/web.php file there you should see the following-

$app*>get('/', function () use($app) {
    return $app->version();
});

Congratulations! Now you have a working Lumen installation. No you can extend this app to listen to your custom endpoints.

Credit:Stack_Overflow_Documentation