Laravel API starter Kit will provide you with the tools for making API's that everyone will love

Overview

Laravel API Starter Kit

Total Downloads License

Laravel API starter Kit will provide you with the tools for making API's that everyone will love, API Authentication is already provided with passport.

Here is a list of the packages installed:

Installation

To install the project you can use composer

composer create-project joselfonseca/laravel-api new-api

Modify the .env file to suit your needs

APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost

LOG_CHANNEL=stack
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=

BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120

MEMCACHED_HOST=127.0.0.1

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_MAILER=smtp
MAIL_HOST=mailhog
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=null
MAIL_FROM_NAME="${APP_NAME}"

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

When you have the .env with your database connection set up you can run your migrations

php artisan migrate

Then run php artisan passport:install

Run php artisan db:seed and you should have a new user with the roles and permissions set up

Tests

Navigate to the project root and run vendor/bin/phpunit after installing all the composer dependencies and after the .env file was created.

API documentation

The project uses API blueprint as API spec and Aglio to render the API docs, please install aglio and merge-apib in your machine and then you can run the following command to compile and render the API docs

composer api-docs

License

The Laravel API Starter kit is open-sourced software licensed under the MIT license

Comments
  • [FR] - Drop dingo?

    [FR] - Drop dingo?

    @kslimani What do you think about dropping dingo for the following reasons:

    • Reduce 3rd party dependencies
    • Encourage API Evolution instead of API Versioning (https://blog.apisyouwonthate.com/api-evolution-for-rest-http-apis-b4296519e564)
    • Change Fractal in favor of native Resources (https://laravel.com/docs/5.6/eloquent-resources)

    Also for the Spec change API Blueprint in favor of OpenAPI 3.0 spec.

    question 
    opened by joselfonseca 8
  • Some issues for composer

    Some issues for composer

    install project by composer facing some problem .and missing doc........ 1.app:install not run . error bellow

    public function setTransformer() :TransformerAbstract
        {
            return app(UserTransformer::class);
        }
    
    1. vendor/bin/phpunit not run < problem : $this->app->instance(ExceptionHandler::class, new class extends Handler {>
    2. don't run php artisan route:list <oauth2 encryption key issue>

    your project have vue.js for need

    • npm install
    question 
    opened by mostafa6765 5
  • Error while running app:install command.

    Error while running app:install command.

    I get this error while running the app:install command.

    Installing the app

    [Symfony\Component\Debug\Exception\FatalErrorException] syntax error, unexpected ':', expecting ';' or '{'

    Hard to tell where the problem is. Help?

    question 
    opened by ivanjpolanco 5
  • Add PHP 7.0 Constraint in composer.json

    Add PHP 7.0 Constraint in composer.json

    When try to Php artisan app:install unable to figure it out the problem

    PHP Parse error: parse error, expecting ';'' or'{'' in /Library/WebServer/Documents/new-api/app/Services/Users/UsersService.php on line 76

    [Symfony\Component\Debug\Exception\FatalErrorException]
    parse error, expecting ';'' or'{''

    opened by unexpected5 5
  • laravel 7 User does not have the right permissions.

    laravel 7 User does not have the right permissions.

    User does not have the right permissions. error showing "message": "User does not have the right permissions.", "status_code": 403, "debug": { "line": 37,

    question 
    opened by k2gsalem 4
  • Pagination link is missing some parameters

    Pagination link is missing some parameters

    In the "index" methods of controllers, i see that the limit query parameter is handled to modify the default pagination. But i see that the appends() paginator method is not used to pass at least the limit parameter so it is missing in the generated link in response pagination metadata.

    Maybe add something like ->appends($request->only('limit')) (and let developer decide if it allow more ? dunno if $request->all() may be a security issue here).

    @joselfonseca what is your opinion on this ?

    opened by kslimani 4
  • Reset password Flow + tests

    Reset password Flow + tests

    Need an endpoint to let the users update passwords. From an admin and user point of view. Don't want to just update the database record in a PUT or PATCH endpoint along with the user's information.

    wontfix Feature Request 
    opened by joselfonseca 4
  • internal api/asset with file upload not working

    internal api/asset with file upload not working

    Error: Call to a member function getRealPath() on array in file C:\xampp\htdocs\textile8\app\Http\Controllers\Api\Assets\UploadFileController.php on line 57

    opened by k2gsalem 3
  • postman return error on create new User

    postman return error on create new User

    on creating a new user with the role return 500 Internal Server Error with "message": "Return value of App\Entities\User::getStoredRole() must implement interface Spatie\Permission\Contracts\Role, null returned", how to solve this issue

    opened by k2gsalem 3
  • Upgrade to laravel 6

    Upgrade to laravel 6

    Hello there! Make sure you include this checklist in the PR

    • [ ] Update to Laravel 6
    • [ ] Update Dingo and all of the dependencies
    • [ ] Update to Ignition instead of woops
    • [ ] Make sure Tests are good
    • [ ] Update Travis to test in minimum required PHP version (7.2 I believe)
    • [ ] Update config files
    • [ ] Update directory structure if needed
    • [ ] Update base models if needed
    hacktoberfest 
    opened by joselfonseca 3
  • Table should not be migrate

    Table should not be migrate

    In Connection.php line 664:

    SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: No such host is known. (SQL: insert into oauth_clients (user_id, name, secret, redirect, personal_access_client, password_client, revok ed, updated_at, created_at) values (, Laravel API Personal Access Client, nBN4Cssau7Xbbe6bDJVbqpN50LrooVB9OdHWB8dn, http://localhost, 1, 0, 0, 2018-08-24 11:15:44, 2018-08-24 11:15:44))

    In Connector.php line 68:

    SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: No such host is known.

    In Connector.php line 68:

    PDO::__construct(): php_network_getaddresses: getaddrinfo failed: No such host is known.

    opened by Raushn 3
Releases(V12.0.0)
  • V12.0.0(Aug 12, 2022)

    What's Changed

    • Apply fixes from StyleCI by @joselfonseca in https://github.com/joselfonseca/laravel-api/pull/104
    • Upgrade to Laravel 9 and corresponding packages.

    Full Changelog: https://github.com/joselfonseca/laravel-api/compare/11.2.2...V12.0.0

    Source code(tar.gz)
    Source code(zip)
  • 11.2.2(Aug 5, 2022)

    What's Changed

    • Apply fixes from StyleCI by @joselfonseca in https://github.com/joselfonseca/laravel-api/pull/103
    • Clean up and drop support for php 7.4 and 8.0

    Full Changelog: https://github.com/joselfonseca/laravel-api/compare/11.2.1...11.2.2

    Source code(tar.gz)
    Source code(zip)
  • 11.2.1(Oct 12, 2021)

  • 11.0.0(Jan 10, 2021)

    Added

    • Registration Endpoint (https://github.com/joselfonseca/laravel-api/issues/77)
    • Forgot Password Endpoint (https://github.com/joselfonseca/laravel-api/issues/78)
    • Reset Password Endpoint (https://github.com/joselfonseca/laravel-api/issues/79)
    • Socialite Integration (https://github.com/joselfonseca/laravel-api/issues/80)
    • Added more tests
    • Added more documentation.
    Source code(tar.gz)
    Source code(zip)
  • 9.0.0(Aug 20, 2020)

  • 8.0.0(Oct 29, 2019)

  • 6.0.1(Sep 17, 2018)

  • 6.0.0(Sep 16, 2018)

  • 5.0.1(Mar 23, 2018)

    Please see

    • https://github.com/joselfonseca/laravel-api/commit/a32ecc2efe5acc70fdf6e096b33ebd102cc7753d
    • https://github.com/joselfonseca/laravel-api/commit/26dee5f461c5cc7811839676246f7f902ed7eb02
    • https://github.com/joselfonseca/laravel-api/commit/ef17b06474fb5a04b6f7187c57e42b101009300e
    • https://github.com/joselfonseca/laravel-api/commit/eff3c8a856711c8e8dda18a9ba4579f2232fe015
    Source code(tar.gz)
    Source code(zip)
  • 5.0.0(Feb 27, 2018)

  • 4.0.5(Feb 27, 2018)

    • https://github.com/joselfonseca/laravel-api/commit/d436faede107be4e1e563ed37adf44f0e5d989bb
    • https://github.com/joselfonseca/laravel-api/commit/9b226af02078789e03562983167bd7f88c8d77d2
    Source code(tar.gz)
    Source code(zip)
  • 4.0.4(Dec 28, 2017)

  • 4.0.3(Dec 28, 2017)

  • 4.0.0(Sep 26, 2017)

    Please see

    • https://github.com/joselfonseca/laravel-api/commit/a9122c38e9cbea79426ec21ee10780dde2db9546
    • https://github.com/joselfonseca/laravel-api/commit/39c4bc2ca4009a72357860b36c4c38d23f597f34
    Source code(tar.gz)
    Source code(zip)
  • 3.2.0(Sep 13, 2017)

    Change log:

    • https://github.com/joselfonseca/laravel-api/pull/27
    • https://github.com/joselfonseca/laravel-api/pull/28
    • https://github.com/joselfonseca/laravel-api/pull/29
    • https://github.com/joselfonseca/laravel-api/pull/30
    • https://github.com/joselfonseca/laravel-api/pull/31
    • https://github.com/joselfonseca/laravel-api/pull/33
    • https://github.com/joselfonseca/laravel-api/commit/07c8c4fb046c04589fc5c815d091859a6c530340

    Most of the release is thanks to @kslimani

    Source code(tar.gz)
    Source code(zip)
  • 3.1.2(Aug 10, 2017)

  • 3.1.1(Aug 7, 2017)

    Please see

    • https://github.com/joselfonseca/laravel-api/commit/9d821ede176ebb0bdc2e7c805033179a4256f9fc
    • https://github.com/joselfonseca/laravel-api/commit/792179d1e982c07e8c86797c5dc0488538d5bba1
    • https://github.com/joselfonseca/laravel-api/commit/22d92ef64c867f61e211414a7ace359b2b84c630
    Source code(tar.gz)
    Source code(zip)
  • 3.1.0(Jul 12, 2017)

    Please see

    • https://github.com/joselfonseca/laravel-api/issues/17
    • https://github.com/joselfonseca/laravel-api/issues/16
    • https://github.com/joselfonseca/laravel-api/issues/15
    Source code(tar.gz)
    Source code(zip)
  • 3.0.0(Jun 27, 2017)

    This release brings Dingo back as well as add more tests and removes all the portal for API only projects

    • Added Dingo API back https://github.com/dingo/api
    • Removed API Tools for simplicity and rely on Dingo as a main API package
    • Added a bunch of tests https://github.com/joselfonseca/laravel-api/tree/master/tests
    • Added API documentation
    • Added yarn command to generate API docs

    TODO

    • Document API docs generation
    • Documentation site.
    Source code(tar.gz)
    Source code(zip)
  • 2.0.5(Apr 20, 2017)

    Minor Fixes

    • Fix cross env issue https://github.com/joselfonseca/laravel-api/commit/f7ef7c32742be9df08f611d98bfcfe829a3e56cd
    • Update Laravel API Tools package https://github.com/joselfonseca/laravel-api/commit/1007b82f16d7de381360b2c4cddac6bb655a1e5b
    • Use phpunit from composer in travis. https://github.com/joselfonseca/laravel-api/commit/bd07f8824b0cf9289603ed557892e03205352261
    Source code(tar.gz)
    Source code(zip)
  • 2.0.4(Apr 19, 2017)

    Change log

    • Fix https://github.com/joselfonseca/laravel-api/issues/1 with https://github.com/joselfonseca/laravel-api/commit/f7ef7c32742be9df08f611d98bfcfe829a3e56cd
    Source code(tar.gz)
    Source code(zip)
Owner
Jose Luis Fonseca
Jose Luis Fonseca
A Laravel Starter Kit for Laravel. Built with Laravel 8.

Laravel Get Started Project Laravel Get Started Project is a basic crud app built with laravel 8. In this app a basic product crud created. Features i

Nazmul Hasan Robin 8 Nov 24, 2022
React laravel starter kit with tailwind css and vite js(laravel 9)

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Jerald Tonmoy Dias 2 Dec 23, 2022
Laravel + Livewire + Bootstrap 5 UI starter kit.

bastinald/ui Laravel + Livewire + Bootstrap 5 UI starter kit. Requirements Laravel 8 NPM Features Bootstrap 5 pre-configured Textarea autosize Floatin

null 83 Dec 26, 2022
a free, open-source dashboard panel starter kit for Laravel

QAdmin a free, open-source dashboard panel starter kit for Laravel. Just intall and everything is ready Tech Stack Client: ruangAdmin, Bootstrap, Jque

null 30 Oct 11, 2022
A simple starter kit for using TypedCMS with the Laravel framework.

TypedCMS Starter Kit for Laravel Our stater kits are tailored solutions for each platform, unlike the simple API wrappers offered by other vendors. Th

TypedCMS 1 Nov 20, 2021
Laravel React Webpack Starter Kit

About Laravel Laravel React Webpack Starter Kit This starter kit is designed to get you up and running with with react.js with Laravel, built on top o

Biju Nakarmi 32 Nov 24, 2022
👔 Enterprise Web application starter kit or template using Laravel

Laravel Enterprise Starter Kit (LESK) Description LESK, is a template project based on the Laravel LTS, combining a set of features that can kick star

Sebastien Routier 1 Dec 31, 2020
A Laravel-Nuxt starter kit.

Laravel-Nuxt A Laravel-Nuxt starter project template. Features Nuxt 2 Laravel 8 SPA or SSR Socialite integration VueI18n + ESlint + Bootstrap 4 + Font

Cretu Eusebiu 1.1k Jan 5, 2023
A Laravel-Vue-Tailwind SAAS Starter Kit.

Super SAAS Template My name is Julien Nahum, I've founded multiple Software-As-A-Service companies. This repo is the base I'm using to create a new SA

Julien Nahum 16 Dec 23, 2022
A Laravel-Vue SPA starter kit.

Laravel-Vue SPA A Laravel-Vue SPA starter kit. Features Laravel 8 Vue + VueRouter + Vuex + VueI18n + ESlint Pages with dynamic import and custom layou

Cretu Eusebiu 3k Jan 6, 2023
A starter kit that integrates Laravel with Vue CLI, Inertia.js, TailwindCSS and Vuetify

Laravel Viltify Laravel Viltify is a heavily opinionated Laravel starter kit. It's intent is to seamlessly integrate V ue, I nertia.js, L aravel, T ai

Matheus Dal'Pizzol 50 Jan 4, 2023
An administration starter kit for Laravel.

Craftable About Demo Packages used Requirements Installation New project Add to existing project Basics Documentation Where to go next? About Hi Craft

BRACKETS 862 Jan 4, 2023
It's a dashboard theme/UI-Starter Kit with Laravel, Inertia and Vue (JetStream).

TailAdmin Inertia It's a dashboard theme/UI-Starter Kit with Laravel, Inertia and Vue (JetStream). Setup Directions npm install composer install Chang

Sinan AYDOĞAN 121 Dec 31, 2022
Laravel Boilerplate / Starter Kit with Gentelella Admin Theme

Laravel Boilerplate Project Laravel Boilerplate provides a very flexible and extensible way of building your custom Laravel applications. Table of Con

Labs64 848 Dec 28, 2022
An implementing of the Laravel Breeze application / authentication starter kit frontend in Next.js

Windmill with Laravel Breeze as Backend API Introduction This repository is an implementing of the Laravel Breeze application / authentication starter

ROKET ID 17 Nov 18, 2022
Laravel Starter Kit (Inertia-SSR - Vue3 - Bootstrap 5)

Laravel Starter Kit (Inertia-SSR - Vue3 - Bootstrap 5) Use this starter kit to develop with Laravel 9 setup InertiaJs with Server Side Rendering (SSR)

Sourav Kumar Tah 16 Nov 16, 2022
Surf, an opinionated fork of Wave - the SAAS starter kit, with Laravel 9.

Surf ??‍♀️ Introduction Surf, the opinionated Software as a Service Starter Kit that can help you build your next great idea ?? . Surf is fork off Wav

Kim Hallberg 14 Oct 6, 2022
This is a laravel Auth Starter Kit, with full user/admin authentication with both session and token auth

About Auth Starter It's a Laravel 8 authentication markdown that will help you to understand and grasp all the underlying functionality for Session an

Sami Alateya 10 Aug 3, 2022
An Starter Kit For Laravel Projects.

Laravel Starter Kit An Starter Kit For Laravel Projects. Installation 1-Install the package via composer: composer require xmen/starter-kit --with-al

4xmen 16 Jun 15, 2023