This is a minimal Laravel 5.1 application to verify that the POData-Laravel package (https://github.com/AlgoWeb/POData-Laravel) actually does what it says on the tin and integrates with Laravel.
Thank you to Kyrylo Kostiukov (https://github.com/kirill533) for prodding me to get some very basic setup instructions written and kindly testing earlier versions of this document.
- Clone out project.
- Run composer install.
- Copy .env.example to .env.
- This step depends on which DB you're using:
- SQLite:
- Create database/database.sqlite.
- Alter the DB_CONNECTION=mysql line in .env to DB_CONNECTION=sqlite.
- Other DB:
- Change the DB_CONNECTION, DB_HOST, DB_DATABASE, DB_USERNAME and DB_PASSWORD values to match the DB you're using - 'mysql' for MySQL/MariaDB, 'pgsql' for PostgreSQL, 'sqlsrv' for SQL Server.
- Generate application key with php artisan key:generate.
- Smoke-check your database connection with php artisan migrate:status. If it throws an error, double-check (and fix) your DB_ settings in your .env file.
- Migrate and seed application with php artisan migrate --seed.
- If you are running locally and just want to get something running to play with, add a line to your .env file with APP_DISABLE_AUTH=true . Don't do this if your POData-Laravel-NorthWind instance is externally accessible.
- Otherwise, set up a test user by:
- Running php artisan tinker.
- When tinker boots, run DB::table('users')->insert(['name'=>'MyUsername','email'=>'[email protected]','password'=>Hash::make('123456')]); . You can freely change the name and email values, and the password value that is passed to the Hash:make call.
- Quit tinker with Ctrl-C.
- Serve application with php artisan serve.
- Browse to http://localhost:8000/odata.svc in your browser of choice..
POData-Laravel-Northwind is open-sourced software licensed under the MIT license