Comments (7)
Sorry, but we found same new issue. I think they are still updating this section in better way.
from leafapi.
The only way to get it working is downloading the MVC app, remove the SCHEMA (which reads from the json, which has WRONG properties) and uncomment the php lines that create the db.
After that, you can install the leafsAPI
from leafapi.
This problem was due to an update in Leaf MVC core, Leaf MVC has already received an update, Leaf API is scheduled to receive one today. In the meantime, you can manually update Aloe CLI by running this command composer require leafs/aloe
.
You will also need to update your existing migrations to use the static capsule from leaf mvc core
if (!static::$capsule::schema()->hasTable("users")):
static::$capsule::schema()->create("users", function (Blueprint $table) {
$table->increments('id');
$table->string('username');
$table->string('name');
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->rememberToken();
$table->timestamps();
});
endif;
from leafapi.
@jhintringer your issue was caused by a different problem though, that's the absence of the db_charset and db_collation env variables
DB_CHARSET=utf8
DB_COLLATION=utf8_unicode_ci
from leafapi.
As promised, the update for Leaf API has just been published, you can now update to v2.2.
A few things to note, global functions json
, markup
, requestData
and requestBody
are no longer supported, you now need to use response()->json()
, response()->markup
, request()->get
and request()->body
respectively.
Note that request
and response
work just as they have in earlier versions.
response(["something" => "value"]);
// is the same as
response()->json(["something" => "value"]);
from leafapi.
Thank you for your update.
I want to point out that also some of the comments in the code were outdated.
Ie: if I create a controller exactly like the UserController already present in the project, by using the CLI, the
$this->auth
does not exists.
Is that because the templating system doesn't work for some reason?. I had to use the static class Auth::id
to check if the user is logged. While the template says to use $this
from leafapi.
Hi @nickelnext, thanks for pointing out the comments and auth feature. All of those have been fixed now.
from leafapi.
Related Issues (11)
- .env does not loading. HOT 4
- Is there a way to left join Models without using query HOT 1
- Parse error HOT 1
- error migrating files HOT 1
- Connection refused with db port other than 3306 HOT 3
- apiResource method not found HOT 2
- API pagination responses
- Auto docs of api HOT 6
- Can't create a model with attributes HOT 2
- Response code not working HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from leafapi.