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.
Jelmer Schreuder
Fuel core developer, check my bio on the about page.
Discussions
1
Comments
792
Activity
CRUD relation models
Didn't notice that, is this code in your controller? And if so, why are you expecting your controller to have a user_id property?
Comment by
Jelmer Schreuder
April 2011
permalink
Get Single Result with a chained ::find()->where()
When you use 'first', 'last' or 'all' the options array is used and the query is executed immediately. When you don't use any of those (thus null) a query object is returned for you to finish.
Comment by
Jelmer Schreuder
April 2011
permalink
CRUD relation models
That should work without problems.
Comment by
Jelmer Schreuder
April 2011
permalink
CRUD relation models
Relating models is very easy: $api = Model_Api::find(5); // fetch api with pk = 5 $user->apis[] = $api; $user->save(); // after saving the api relation to the user has been saved and reindexed to have array key = PK (thus 5) // if we want…
Comment by
Jelmer Schreuder
April 2011
permalink
Get Single Result with a chained ::find()->where()
@Phil, that won't work - the 'first' arg can't be combined with the method chaining syntax. @jondavidjon I'm not sure what's wrong, but from the error I can deduce you're using RC2. This may have already been fix…
Comment by
Jelmer Schreuder
April 2011
permalink
DB: where escaping non integers
You need DB::expr(), check the docs. Everything wrapped in a Database_Expression isn't escaped.
Comment by
Jelmer Schreuder
April 2011
permalink
Class 'Orm\Model' not found
Also: what is the exact error message? (copy-pasted prefereably)
Comment by
Jelmer Schreuder
April 2011
permalink
Help with Test Units
http://www.phpunit.de/manual/current/en/index.html
Comment by
Jelmer Schreuder
April 2011
permalink
ORM Relating Models with extra join and where
Just added to dev branch and examples in docs.
Comment by
Jelmer Schreuder
April 2011
permalink
ORM suggestion
When you lazy-load you use the property as if it's already there, that means you can't query it in the process. Lazy loading is a quick shortcut, for real querying you use the eager loading. What you're proposing is a very-very bad i…
Comment by
Jelmer Schreuder
April 2011
permalink
Again About Validation...
As always: tell us what happens. "I failed" tells me nothing. What validation messages are output? Or are you getting an exception?
Comment by
Jelmer Schreuder
April 2011
permalink
ORM suggestion
It's always smart to look into the issues on Github: https://github.com/fuel/orm/issues (this is partially already planned) Also if you make suggestions on the forums: don't count on any of us remembering, I don't plan or decide base…
Comment by
Jelmer Schreuder
April 2011
permalink
Modules routing
This is a bugreport, not really a topic of discussion. Should go to https://github.com/fuel/core/issues
Comment by
Jelmer Schreuder
April 2011
permalink
many to many, and its related rows
Not yet, this will be in 1.1: https://github.com/fuel/orm/issues/6
Comment by
Jelmer Schreuder
April 2011
permalink
Github pull requests
Create a branch for each change you make, and make sure each branches from the original Fuel develop branch so only one of your changes is included per branch. That way we can easily see which changes belong to your pull request. Because if you inc…
Comment by
Jelmer Schreuder
April 2011
permalink
Help with SimpleGroup
Code tags are (without spaces): [ code] & [/ code] If you want the current group/acl driver those are indeed correct, but you should also be able to request them like this (without the specific drivers): $group_driver = \Auth::group(); $acl_dri…
Comment by
Jelmer Schreuder
April 2011
permalink
Uri::last();
I'd say there's a point where it all becomes clutter, PHP has pretty good functions for working with arrays. The following would do fine for me: $segments = Uri::segments(); $end = end($segments); What I might agree with, is to allow s…
Comment by
Jelmer Schreuder
April 2011
permalink
Validation callback
Not sure what you mean by your last question to huglester, but maybe he does? Also you're checking for a variable $errors, but I don't see it set anywhere? You might want to add something like this to your controller: $this->templat…
Comment by
Jelmer Schreuder
April 2011
permalink
Validation callback
I have no idea what your view looks like, so I can't tell you why that is.
Comment by
Jelmer Schreuder
April 2011
permalink
Validation callback
I read through this before, not sure how I missed this. add_rule() doesn't do string parsing, it expect the function and its arguements as arguements - not in a string to be parsed as the add_field() method does. That has severe limitations wi…
Comment by
Jelmer Schreuder
April 2011
permalink
db support question
Here's a DB config example for the PDO driver with mySQL: 'dev' => array( 'type' => 'pdo', 'connection' => array( 'dsn' => 'mysql:host=localhost;dbname=test…
Comment by
Jelmer Schreuder
April 2011
permalink
new user, fresh install, need help
Using the template controller is one way. The problem with you current function is that it still uses $this->output which was removed for RC1 in favor of a response object. Now you change it like this: public function action_index() { $…
Comment by
Jelmer Schreuder
April 2011
permalink
RC2 Auth Package Error
Did you copy the auth.php config file to your app? If so you need to change the casing of the driver: it is now called "SimpleAuth" instead of "Simpleauth". Or if you were extending it it now needs to be called Auth_Login_Simple…
Comment by
Jelmer Schreuder
April 2011
permalink
Custom validation
Currently the only rule that does something similar is within the Validation class: match_field That works because it can get the Validation instance to ask for the input. However, if you will only use this with POSTed values and never with manual …
Comment by
Jelmer Schreuder
April 2011
permalink
Having problem with ORM
If you're not using the template the Controller_Template might not be the best option, but if you do need to switch off the auto rendering that's possible. After the following code the template won't be rendered anymore: $this->au…
Comment by
Jelmer Schreuder
April 2011
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
Jelmer Schreuder
Joined
January 2011
Visits
7
Last Active
May 2016
Roles
Administrator