Love Fuel?
Donate
About
Forums
Discussions
Login
FuelPHP Forums
Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
WanWizard
a.k.a. WanWizard
Discussions
4
Comments
8242
Activity
model self relation
Self relation works like any other relation, the only difference is the model you relate to, which is the same model: class SelfRelation extends \Orm\Model { /** * @var array model properties */ protected static $_properties = …
Comment by
WanWizard
December 2015
permalink
Fuelphp templating
Ok, then the same method applies, but the base controller should extend the normal controller, not the template controller, and it it's after method, return a response with the theme object in it.
Comment by
WanWizard
December 2015
permalink
How to add and show custom menu items on header after user login
In your controller: return \View::forge('myview')->set('is_logged_in', \Auth::check()); in your "myview" view: Logout Login for example... ;-) You should do this in a presenter as it's not really control…
Comment by
WanWizard
December 2015
permalink
skip to migration version 1
To make the story complete: you can also migrate down to a specific version: oil refine migrate:down --version=1
Comment by
WanWizard
December 2015
permalink
skip to migration version 1
There are two places in which migrations are tracked: the "migration" table, and the migration config file. The contents of the table is leading. If the table does not exist, or is empty, migrations will start with the first one. If the…
Comment by
WanWizard
December 2015
permalink
Fuelphp templating
If your application is small, I would use a base controller that extends the template controller. In the before method of this controller, I would define the page template, and all static sections of the template. Have your application controller …
Comment by
WanWizard
November 2015
permalink
How ORM Model generate Array or KeyValuePair Array for has_many?
Ah, now you have an entirely different situation. Before you described a direct relation between weapon and combo. The rules for ORM relations are very simple. Every relation is constructed using primary key -> foreign key. A key may be a single…
Comment by
WanWizard
November 2015
permalink
How ORM Model generate Array or KeyValuePair Array for has_many?
Yes, ORM supports a composite primary key without problems, but your tables don't have one. A relation is defined by primary key => foreign key. If primary key is a composite key, ALL fields of that key should be present in the other table …
Comment by
WanWizard
November 2015
permalink
How ORM Model generate Array or KeyValuePair Array for has_many?
All ORM models MUST have a primary key. It doesn't work without. If your database design doesn't call for one, use an "id" with auto-increment. And primary keys must be unique. A composite key is a primary key, but one with multi…
Comment by
WanWizard
November 2015
permalink
XML output on REST controller
Inflector is driven by a language dependent ruleset. A default EN version can be found in fuel/core/lang/en/inflector.php. You can copy this to your app and add your own singular (plural -> singular) and plural (singular -> plural) rules to i…
Comment by
WanWizard
November 2015
permalink
XML output on REST controller
The problem here is with singular and plural. The idea is that your collection is a plural word, and every item is the singular version of that. As an example: $ oil console Fuel 1.8-dev - PHP 5.6.15 (cli) (Oct 29 2015 14:58:50) [Linux] >>>…
Comment by
WanWizard
November 2015
permalink
auth
I recently explained how it works: see http://fuelphp.com/forums/discussion/comment/20198
Comment by
WanWizard
November 2015
permalink
ORM Model code generation from database?
Don't know. Most people don't implement database constraints as it may interfere with the ORM's workings (especially when you use cascading deletes), and it is also very RDBMS specific, so it can't be implemented in the drivers …
Comment by
WanWizard
November 2015
permalink
Moving from local to remote server
Well, you should also run a composer update after you have done that to update the installed composer packages.
Comment by
WanWizard
November 2015
permalink
Moving from local to remote server
You need to add phpseclib to your composer.json: https://github.com/fuel/fuel/commit/87c1a6feb5deaff63dfa2cb561035ea6c51b724b
Comment by
WanWizard
November 2015
permalink
Setting a cron job with OIL
No worries, we're here to help ;-)
Comment by
WanWizard
November 2015
permalink
Setting a cron job with OIL
You might need to use DB::expr("`field` + 1") to avoid it being seen as a literal value (a string).
Comment by
WanWizard
November 2015
permalink
Fatal Error - Class 'Mailgun\Mailgun' not found in /var/www/mysite/fuel/packages/email/classes/em
Not sure, we only use dedicated servers and deploy using git (so composer runs on the servers). I suggest you do it and see if it helps. When you run a composer install or update it will generate the autoloader files in vendor/composer with the na…
Comment by
WanWizard
November 2015
permalink
Setting a cron job with OIL
I'm not familiar with Windows, but the commandline should be: \path\to\php.exe \path\to\your\app\oil r taskclass:method unless php.exe is in your path, then php.exe should be enough. There is no cd needed, fuelphp doesn't care what the c…
Comment by
WanWizard
November 2015
permalink
Fatal Error - Class 'Mailgun\Mailgun' not found in /var/www/mysite/fuel/packages/email/classes/em
Looks like your missing a lot of composer stuff, in particular vendor/composer, which contains the composer autoloader and the autoloader configuration. Since you are getting no error that the composer autoloader is missing, my guess is that you ha…
Comment by
WanWizard
November 2015
permalink
db name
1. It's not readily available, you need to retrieve it from the DB config. And you might need to parse it, since different types use different fields. For example "mysqli" uses a "database" field, but PDO uses a "dsn&q…
Comment by
WanWizard
November 2015
permalink
db name
What exactly is the question?
Comment by
WanWizard
November 2015
permalink
post response is null in rest api
Isn't that logical? api/register?email=email&passowrd=password is a GET-type request (with a query string), not POSTed data (in multipart/form-data).
Comment by
WanWizard
November 2015
permalink
post response is null in rest api
That's not really anough information to give a meaningful answer. For Fuel, the method used to request a controller method isn't really relevant, all work exactly the same.
Comment by
WanWizard
November 2015
permalink
ORM Model code generation from database?
Note that it does not generate relations, there is no way it can reliably determine the relations between two tables.
Comment by
WanWizard
November 2015
permalink
More Comments
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
About
Username
WanWizard
Joined
January 2011
Visits
2,365
Last Active
April 26
Roles
Administrator