You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The workflow:
I have usable mysql schema so I try bake model Baking your initial scaffolding using [bake](https://book.cakephp.org/bake/2/en/index.html) in conjunction with the [MixerAPI/Bake](https://mixerapi.com/bake) theme.
The two links is not usable, the first go to cakephp2 the second is empty (404)
I navigate form the left menu Bake Controllers
I set in the app_local.php the default datasources (mysql)
Bake the model and .... "Your database does not have any tables" and put full html source to console
but "Datasource class Connection could not be found. "
I must to change the app.php
back the original className and driver from sqlite to mysql
After this I can bake the models. bake model Subscribers --theme MixerApi/Bake
Next bake the controllers bin/cake bake controller Subscribers --theme MixerApi/Bake
The validations is is skip at this situation
The routes
Building your RESTful routes with or without MixerAPI/Rest.
The second link is empty (404)
I try the " RESTful Routes " from the left menu bin/cake mixerapi:rest route create
This modify the routes.php
Yes and not 😄
I found some broken and wrong link in the documentation this is bug? I think no.
I have result to my step by step trying, but i don't know this is correct, or not
My test api code is give it back json result but only when I call the url with .json extension.
Without extension I get" missing template page"
I think that's not good, I want call my api without extension to json result, but maybe that's how you planned it the plugin.
mod 02-16
ok must to send the request with Application/json header
I don't know this my settings error, or a bug
My thinks:
The datasource replace from mysql to sqlite in the app.php is not practical.
The router.php duplicate definition is a bug (I not write any to router.php only I generate the code)
I want to try this API in my project.
Over the learning I found some error in doc.
My step by step process 😄
Make clean cakephp install
composer create-project --prefer-dist cakephp/app:4.* ./
The next steps from the mixerapi.com
Dependecies error..
I try with:
This ready install, I always use 'Y' option
bin/cake mixerapi install
MixerAPI Installation Complete!
The workflow:
I have usable mysql schema so I try bake model
Baking your initial scaffolding using [bake](https://book.cakephp.org/bake/2/en/index.html) in conjunction with the [MixerAPI/Bake](https://mixerapi.com/bake) theme.
The two links is not usable, the first go to cakephp2 the second is empty (404)
I navigate form the left menu Bake Controllers
I set in the app_local.php the default datasources (mysql)
Bake the model and .... "Your database does not have any tables" and put full html source to console
I try to set in the app_local
but "Datasource class Connection could not be found. "
I must to change the app.php
back the original className and driver from sqlite to mysql
After this I can bake the models.
bake model Subscribers --theme MixerApi/Bake
Next bake the controllers
bin/cake bake controller Subscribers --theme MixerApi/Bake
The validations is is skip at this situation
The routes
Building your RESTful routes with or without MixerAPI/Rest.
The second link is empty (404)
I try the " RESTful Routes " from the left menu
bin/cake mixerapi:rest route create
This modify the routes.php
At this point I check in browser http://127.0.0.1:8006/subscribers/1001
http://127.0.0.1:8006/subscribers/1001.json
Ready come back the json
I want result without the json extension
I see the generated routes.php and I think is not correct is contain duplicated definition (I not change manual )
Finale in production I need to use the mixerapi only with prefix (ApiV1, Apiv2 ...)
The text was updated successfully, but these errors were encountered: