PHP Framework for building scalable API's on top of Laravel.

Overview

forthebadge

Apiato

Build scalable API's faster | With PHP 7.2.5 and Laravel 7.0

Apiato Logo

apiato Scrutinizer Code Quality Codacy Badge Build Status Build Status Latest Stable Version Backers on Open Collective Sponsors on Open Collective License

Apiato is a framework for building scalable and testable API-Centric Applications with PHP, build on top of Laravel.

It is designed to help you build scalable API's faster, by providing tools and functionalities that facilitates the development of any API-Centric App.

Apiato uses the best frameworks, tools and conventions in a very creative way, to deliver a rich set of features for a modern PHP Application.

Why!? Because setting up a solid API from scratch is time consuming (and of course, time is money!). Apiato gives you the core features of robust API's fully documented, for free; so you can focus on writing your business logic, thus deliver faster to your clients.

Why API-Centric Apps?
Today we’re living in a digital era, where almost everything is connected to the Internet.

Building cross-devices applications is becoming a must. And to do it, you need APIs (Application Programing Interfaces).

Web developers are used to serve HTML pages directly from the Backend. However, this traditional method has many disadvantages nowadays.

API's can serve anything and everything (Mobile Apps, Web Apps, Smart TVs, Smart Watches,...).
As well as, it can be exposed to the world allowing developers to interact with your Application and help growing your business.

API-Centric Apps allows Frontend (Web + Mobile) and Backend developers to work on their codes in parallel. 
After the Frontend Apps are ready they get attached to the Backend (API-Centric) code to start functioning. 
This leads to zero decoupling between the Frontend and the Backend code and also removes the dependencies. 
The API documentation acts as the contract between both sides during the development life cycle of all the Apps.

Features

Apiato comes with an amazing list of features.

Apiato Features

Documentation

Apiato is built using the new architectural pattern Porto.

Porto SAP is a modern Software Architectural Pattern, designed to help developers organize their Code in a super maintainable way. It is very helpful for big and long term projects, as they tend to have higher complexity with time.

It's completely optional to build your application using the Porto architecture. Alternatively, you can build it using the MVC architecture, and still benefit from all the features of Apiato.


Apiato Docs


Join our Discord server, by clicking on the icon below.

Apiato Discord

Contributing

Feel free to dive in! Fix open Issues and submit new features.
Make sure you check our contribution guide before getting started.
Apiato follows the Contributor Covenant Code of Conduct.

Awesome People

Apiato is an MIT-licensed open source project with its ongoing development made possible entirely by the support of all these smart and generous people, from code contributors to financial contributors. 💜

Project Maintainers


Mahmoud Zalt
@mahmoudz

Johannes Schobel
@johannesschobel

Johan Alvarez
@llstarscreamll

Zeljko Marenovic
@zmaren

Renato Dehnhardt
@rdehnhardt

Julián Bustamante
@JulianBustamante

Ahmed Abd El-Ftah
@Te7a-Houdini

FWidm
@FWidm

Lloric Mayuga Garcia
@lloricode

Pepe
@jlorente

Arthur Vandenberghe
@deviouspk

Null HZ61 P1
@hz61p1

Martin Kiesel
@Kyslik

Samer Halawani
@shalawani

< Join Us >
@apiato

Code Contributors

Apiato Contributors

Financial Contributors

Open Collective backers

You can support us using any of the methods below:

1: Open Collective
2: Paypal
3: Github Sponsors
4: Patreon


Sponsors

Sponsoring is an act of giving in a different fashion. 🌱

Gold Sponsors

Silver Sponsors

Bronze Sponsors

You can sponsor us using any of the methods below:

1: Sponsor via Open Collective.
2: Email us at [email protected].

Sponsors logos are displayed on the github repository page and the documentation website home page.

License

MIT © Mahmoud Zalt

Issues
  • An Exception occurred when trying to authenticate the User

    An Exception occurred when trying to authenticate the User

    I set in .env file QUERIES_DEBUG=true

    I open admin to login. put the email and password click the "login" button The page show "An Exception occurred when trying to authenticate the User"

    Why? How to fix? Thank you

    opened by maliang 38
  •  Has the project stopped updating? How to plan next. happy New Year!

    Has the project stopped updating? How to plan next. happy New Year!

    Has the project stopped updating? How to plan next. happy New Year!

    opened by Osub 27
  • Any upgrades in near future? Laravel 5.8 or 6.0?

    Any upgrades in near future? Laravel 5.8 or 6.0?

    Hello! Are any updates planned for the near future? Will laravel upgrade to 5.8 or 6.0? Or is the project already abandoned? Thanks for any information.

    opened by serj42 20
  • Hashed Id's returning hash of primary key when value is null

    Hashed Id's returning hash of primary key when value is null

    Expected Behavior

    Return null for the attribute that is null

    Actual Behavior

    Return hash of primary key when attribute is null

    Steps to Reproduce the Problem

    1. Create model with PrimaryKeyId, OtherIdToHash attributes
    2. In transformer for model, hash both PrimaryKeyId and OtherKeyId. See code below.
    3. Retrieve saved model where OtherKeyId is null. The transformer returns hash of the primary key

    Specifications

    • Apiato Version: 2.0.7

    Additional Details

    Code in transformer ` public function transform(MyModel $entity) { $response = [ 'object' => 'MyObject', 'Id' => $entity->getHashedKey(), 'OtherKeyId' => $entity->getHashedKey($entity->OtherKeyId), ];

        return $response;
    }`
    

    Expected JSON: { "data": [ { "object": "MyObject", "Id": "xbd95q89l87mlvng", "OtherKeyId": null, } ] } Actual JSON: { "data": [ { "object": "MyObject", "Id": "xbd95q89l87mlvng", "OtherKeyId": "xbd95q89l87mlvng", } ] }

    opened by desertfoxmb 14
  • App\Ship\Parents\Providers\EventsProvider Default  Not Provider

    App\Ship\Parents\Providers\EventsProvider Default Not Provider

    in ApiatoProvier.php file

        public $serviceProviders = [
            // Third Party Packages Providers:
            HashidsServiceProvider::class,
            RepositoryServiceProvider::class,
            CorsServiceProvider::class,
            FractalServiceProvider::class,
            HeimdalExceptionsServiceProvider::class,
    
            // add the Laravel Tinker Service Provider
            TinkerServiceProvider::class,
    
            // Internal Apiato Providers:
            EventServiceProvider::class, //The custom apiato eventserviceprovider
            RoutesProvider::class, // exceptionally adding the Route Provider, unlike all other providers in the parents.
            ShipProvider::class, // the ShipProvider for the Ship third party packages.
            GeneratorsServiceProvider::class, // the code generator provider.
        ];
    

    not include EventsProvider

    Should add to ShipProvider.php by hand ?

    opened by yesterday679 14
  • Fresh install of stable returning ValueObject not found error

    Fresh install of stable returning ValueObject not found error

    Expected Behavior

    Fresh install of apiato should return no errors.

    Actual Behavior

    An error page occurs, and checking laravel.log file contains this error:

    [2017-12-11 07:55:56] local.ERROR: Class 'Apiato\Core\Abstracts\ValueObjects\ValueObject' not found {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalErrorException(code: 1): Class 'Apiato\\Core\\Abstracts\\ValueObjects\\ValueObject' not found at D:\\Projects\
    apiato-test\\app\\Ship\\Parents\\ValueObjects\\ValueObject.php:13)
    [stacktrace]
    #0 {main}
    "} 
    
    

    Steps to Reproduce the Problem

    1. composer create-project apiato/apiato my-api
    2. Follow the rest of the steps at the Installation Guide

    Specifications

    • Apiato Version: Surprisingly, I pulled stable, but composer tells me apiato/core is loaded from dev-master.

    Additional Details

    opened by ralphstodomingo 13
  • 404 not found

    404 not found

    Hi! I'm just curious about Hello-API, reading the documentation I feel it's a really good starting point to create a brand new API using Laravel. So, I followed the installation instructions and everything seems to be fine. API responds. That's ok. The point is that the response from API is always 404.

    curl -X POST -H "Accept: application/json" -F "[email protected]" -F "password=secret#pass" -F "name=John Doe" "http://api.mega.pro/register"

    The answer is:

    {"message":"404 Not Found","status_code":404}%

    Am I forgetting something?

    Type:Help 
    opened by rayoplateado 13
  • Filter Transformers

    Filter Transformers

    This update updates the transformer when requesting an endpoint with ?filter=name;email;x parameters. Thereby, all "unwanted" fields are removed from the resultset.

    Works with all currently provided Serializers (DataArraySerializer, JsonApiSerializer, ...)

    This fixes issue #140 .

    opened by johannesschobel 13
  • Model Factory from Unit test does not trigger model events

    Model Factory from Unit test does not trigger model events

    Calling model factory create in unit test for example factory(App\User::class)->create() Will not trigger Model Events (https://laravel.com/docs/5.6/eloquent#events)

    Steps to Reproduce the Problem

    Create the following Observers https://laravel.com/docs/5.6/eloquent#observers In for example User Container add some User factory and call it from unit tests you will see that model events are not triggered.

    Specifications

    • Apiato Version: "apiato/core": "dev-master",

    Additional Details

    I have tested the same behavior with laravel 5.6 and the events are fired While debugging this bug in apiato I came to The custom apiato eventserviceprovider \Apiato\Core\Abstracts\Events\Providers\EventServiceProvider If we comment the loading of this provider in \Apiato\Core\Providers\ApiatoProvider::$serviceProviders the model event will be triggered.

    Maybe the order of provider register should be different, need more time to debug. Please advice if you already have a solution.

    opened by denis019 12
  • Generator not working with command line params

    Generator not working with command line params

    Expected Behavior

    Use command line params as described to kick start generation process

    Actual Behavior

    Error during creation. Works as expected without -c, -f command line parameters

    n Filesystem.php line 41:

    File does not exist at path C:\projectpath\vendor\apiato\core\Generator/Stubs/actions/0.stub

    Steps to Reproduce the Problem

    Run php artisan apiato:generate:action -cContainer -fDoSomethingAction

    Specifications

    • Apiato Version: 2.2

    Additional Details

    opened by desertfoxmb 12
  • Request Default Support for Laravel Sanctum.

    Request Default Support for Laravel Sanctum.

    Requesting the support for Laravel Sanctum for small / Medium sized projects

    Ref - As its recommended for simplicity in designing of Auth Service.

    Type:Feature 
    opened by brunoalfred 0
  • Cache doesn't work for $this->repository->paginate();

    Cache doesn't work for $this->repository->paginate();

    Description:

    Cache doesn't work for $this->repository->paginate(); while it works for 'all', 'find', 'findByField', 'findWhere', 'getByCriteria'

    Expected Behavior:

    Cache should work for $this->repository->paginate();

    Versions:

    • Apiato Version: 9.0.0
    • PHP Version: 7.4.4

    Steps To Reproduce:

    1. Enable cache setting in .env
    2. Call $this->repository->paginate(); task and check if it hits the cache

    Possible solution:

    When call $this->repository->paginate();, the paginate() of the abstract class Repository is called(/app/Ship/core/Abstracts/Repositories/Repository.php) then parent::paginate($limit, $columns, $method) is called. This paginate function SHOULD be from CacheableRepository of the I5-repository package in order to use the cache service, however, actually it is from BaseRepository.

    So I created another abstract class ParentRepository as below:

    <?php
    
    namespace Apiato\Core\Abstracts\Repositories;
    
    use Prettus\Repository\Contracts\CacheableInterface as PrettusCacheable;
    use Prettus\Repository\Eloquent\BaseRepository as PrettusRepository;
    use Prettus\Repository\Traits\CacheableRepository as PrettusCacheableRepository;
    
    abstract class ParentRepository extends PrettusRepository implements PrettusCacheable
    {
        use PrettusCacheableRepository;
    }
    

    and updated the Repository.php extends thisParentRepository instead.

    namespace Apiato\Core\Abstracts\Repositories;
    
    use Illuminate\Support\Facades\Config;
    use Prettus\Repository\Criteria\RequestCriteria as PrettusRequestCriteria;
    use Request;
    
    /**
     * Class Repository.
     *
     * @author  Mahmoud Zalt <[email protected]>
     */
    abstract class Repository extends ParentRepository
    {
        /**
         * Define the maximum amount of entries per page that is returned. 
         * Set to 0 to "disable" this feature
         */
        protected $maxPaginationLimit = 0;
    

    This fixes the problem at this moment. Does anyone have a better suggestion? Thank you!

    Priority:Low Type:Bug 
    opened by Jedliu 0
  • Search Query Parameter with hashId

    Search Query Parameter with hashId

    Expected to use hashid in search param but had to use real id

    tested as admin on: {{url}}/v1/users?search=id:1 with HASH_ID=true in .env

    opened by Nesh83 3
  • Feature: GraphQL

    Feature: GraphQL

    It would be nice to take advantage of GraphQL

    Type:Feature 
    opened by luciano-jr 8
Releases(v10.0.7)
Owner
Apiato
PHP API Framework
Apiato
PHP Framework for building scalable API's on top of Laravel.

Apiato Build scalable API's faster | With PHP 7.2.5 and Laravel 7.0 Apiato is a framework for building scalable and testable API-Centric Applications

Apiato 2.4k Jun 9, 2021
A Laravel 5 package that switchs default Laravel scaffolding/boilerplate to AdminLTE template and Pratt Landing Page with Bootstrap 3.0

AdminLTE template Laravel package A Laravel package that switch default Laravel scaffolding / boilerplate to AdminLTE template with Bootstrap 3.0 and

Sergi Tur Badenas 1.8k May 22, 2021
Build a full-featured administrative interface in ten minutes

⛵ laravel-admin is administrative interface builder for laravel which can help you build CRUD backends just with few lines of code. Documentation | 中文

Song 10k Jun 15, 2021
:computer: :octocat: A hackathon/MVP boilerplate for laravel web applications. Start your hackathons without hassle.

Laravel Hackathon Starter - SUSUMU 進 If you have attended any hackathons in the past, then you know how much time it takes to get a project started: d

Prosper Otemuyiwa 1.6k Jun 14, 2021
Someline Starter is a PHP framework for quick building Web Apps and Restful APIs, with modern PHP design pattern foundation.

Someline Starter PHP Framework Tested and used in production by Someline Inc. Someline Starter is a PHP framework for quick building Web Apps and Rest

Someline 852 Jun 3, 2021
Build and deploy Non-Fungible Algorand Tokens with Laravel & IPFS

Introduction Laravel is a web application framework with an expressive, elegant syntax designed to make developing web apps easier and faster through

Tomas Verhelst 4 May 30, 2021
High scalable boilerplate for Laravel - Vue using laravel-mix.

Why use this ? This boilerplate make developer easier to make monolith Laravel project which integrated with Vue.js and vue-router as default front-en

Carvel Saputra Martaloho 4 May 24, 2021
Aplikasi pertama belajar laravel 8 dan saat masih dalam pengerjaan.

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

Wandi Pratama 3 Apr 22, 2021
A PHP framework for console artisans

This is a community project and not an official Laravel one Laravel Zero was created by, and is maintained by Nuno Maduro, and is a micro-framework th

Laravel Zero 2.7k Jun 11, 2021
Laravel Vue SPA, Bulma themed. For demo login use `[email protected]` & `password` -

Laravel Enso Hit the ground running when building your new Laravel SPA project with boilerplate and extra functionality out of the box! click on the p

Laravel Enso 982 Jun 12, 2021
Until 2018, Backpack v3 used this Base package to offer admin authentication and a blank admin panel using AdminLTE. Backpack v4 no longer uses this package, they're now built-in - use Backpack/CRUD instead.

Note: This package is only used by Backpack v3. Starting with Backpack v4, everything this package does is included in Backpack/CRUD - one package to

Backpack for Laravel 851 Jun 4, 2021
An example of Laravel app that runs in a docker container with RoadRunner

This repository contains an example of Laravel (PHP Framework) application that runs in a docker container with RoadRunner (high-performance PHP appli

Paramtamtam 14 Jun 17, 2021
Prepare your Laravel apps incredibly fast, with various commands, services, facades and boilerplates.

Grafite Builder Grafite has archived this project and no longer supports or develops the code. We recommend using only as a source of ideas for your o

Grafite Inc 1k Jun 10, 2021
A Laravel 5.8 API Boilerplate to create a ready-to-use REST API in seconds.

Laravel API Boilerplate (JWT Edition) for Laravel 5.8 Laravel API Boilerplate is a "starter kit" you can use to build your first API in seconds. As yo

Francesco Malatesta 1.2k Jun 14, 2021