prusmarcin/laravel-rest-server is a Laravel package for package rest full server for laravel 5.6.
It currently has 0 GitHub stars and 4 downloads on Packagist.
Install it with composer require prusmarcin/laravel-rest-server.
Discover more Laravel packages by prusmarcin
or browse all Laravel packages to compare alternatives.
Last updated
Package Rest Full API server for Laravel
You can see package Client API package laravel-rest-client for use on a separate Laravel installation
To install this package you will need:
Laravel 5 (see compatibility table)
PHP 7.0 +
Install via composer - edit your composer.json to require the package.
{
"require": {
"prusmarcin/laravel-rest-server": "dev-master"
}
}
Then run composer update in your terminal to pull it in.
Or via the command line in the root of your application installation.
$ composer require prusmarcin/laravel-rest-server
Once this has finished, you will need to add the service provider to the providers array in your app.php config as follows:
\Restserver\RestserverServiceProvider::class,
And configure the database connection in .env file for your Laravel installation.
Run migration
$ php artisan migrate
Note: If you have error when you run migration: "Specified key was too long error solution". Read this article: https://geektnt.com/laravel-5-4-migration-unique-key-is-too-long.html
Run seeder
$ php artisan db:seed --class=Restserver\\Seeds\\DatabaseSeeder
Run laravel server
$ php artisan serve
And you're done!
http://localhost:8000/api/items/available
Returns
[{"id":5,"name":"Produkt 8","amount":2},{"id":4,"name":"Produkt 7","amount":6},{"id":2,"name":"Produkt 2","amount":12},{"id":1,"name":"Produkt 1","amount":4}]
More methods:

Run laravel server
$ php artisan serve
Then run the tests with:
$ vendor/bin/phpunit vendor/prusmarcin/laravel-rest-server
The MIT License (MIT). Please see License File for more information.