merlosy / laravel-restful-api-starter Goto Github PK
View Code? Open in Web Editor NEWBuild a RESTful API with Laravel and MongoDB
Home Page: http://merlosy.github.io/laravel-restful-api-starter
License: MIT License
Build a RESTful API with Laravel and MongoDB
Home Page: http://merlosy.github.io/laravel-restful-api-starter
License: MIT License
I'm a very beginner of laravel and php. I find Laravel framework to implement my restful API so I want to use your source to start my web service.
Hello
I got 3 questions/requests:
Can you upload somewhere client [or at least some code how to login/create account etc. with js/jQuery or AngularJS) to test that API?
Can you describe (add some comments to code) why you did something 'this way'?
Can you create 'database migrate'? I would like to test is with SQLite and MySQL.
Thank you for your great example 'how to create restful laravel api'. I hope you will have some time to answer my questions.
Hi there,
Great project - I'm new to Laravel so this is a great project to learn from. I am rather confused however how I can call the logout & show method. What should the {users} argument have as a value?
Thanks in advance!
Sam
in User.php:
If the client request contains a blank 'device_id', 'device_os', this query will delete auth tokens belonging to other users.
// clear old sessions for any user with: same(device_id, os)
$to_remove = Token::where('device_id', '=', $device_id)
->where('device_os', '=', $device_type)
->delete();
I propose fixing with:
$to_remove = Token::where('user_id', '=', $this->id)
->where('device_id', '=', $device_id)
->where('device_os', '=', $device_type)
->delete();
Hi
Thanks for sharing this code.
I have in mind using it but with mysql. I have everything in place and I've edited database.php to default to mysql. But when I do post to users to create a new one I get:
{"error":{"code":500,"message":"Class 'MongoDate' not found","file":"\/home\/vagrant\/Code\/prueba.com\/vendor\/jenssegers\/mongodb\/src\/Jenssegers\/Mongodb\/Model.php","line":212}}
What am I missing to use this code with just mysql?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.