This is a stub for an app store demonstrating nested resources in laravel. See: https://stackoverflow.com/a/46353195/4233593
Clone this repository.
git clone https://github.com/MyTeamName/appstore4233593.git
Set your environment variables if you haven't already.
cp .env.example .env
Set your database credentials.
Make sure your APP_KEY
is set.
php artisan key:generate
Run database migrations.
php artisan migrate
Use the factory to create some demo data.
php artisan tinker
factory(App\Category::class, 10)->create()->each(function ($category) { $apps = factory(App\App::class, 20)->make(); $category->apps()->saveMany($apps); });
Now browse to /api/v1/categories
or /api/v1/categories/1/apps