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
Fatal error while joing many related table
Nothing much you can do about it I think. I assume you are pulling in a lot of records, each row may create a lot of objects. For example, if you have a parent with 10 children, each having 10 childeren as well, you're creating 111 ( 1 + 10 + …
Comment by
WanWizard
March 2016
permalink
help for query
Afaik the DB class can't handle subqueries in the select. The rest should be no problem.
Comment by
WanWizard
March 2016
permalink
Creating New Propert from Observer
Ah, you didn't mention that. EAV is very different from custom values, you can't even mix the two. array_merge() indeed renumbers numeric array indexes. Can you tell exactly what you changed, and where? I don't think the design of EA…
Comment by
WanWizard
March 2016
permalink
How can we connect to a newly created database?
I can imagine that without the disconnect it will not work, since the selected database context is lost after you dropped it. But if you disconnect after creating the database again, the Migrate call should reconnect, and since the database does ex…
Comment by
WanWizard
March 2016
permalink
Populate form select box with related values from database
I usually do: // create the model fieldset $form = \Fieldset::forge('formname'); $form->form()->add_csrf(); $form->add_model('\\Model\\Modelname'); ( I namespace all my classes, instead of using underscores ). You the…
Comment by
WanWizard
March 2016
permalink
How can we connect to a newly created database?
If "db_name" is the database you have defined as your default database in db.php, you don't need to connect, the first DB call would automatically connect for you. If it is not your default database, but another named database defini…
Comment by
WanWizard
March 2016
permalink
Populate form select box with related values from database
There are several solutions possible, depending on how many times you need to generate the fieldset, and how volatile your data is. In general, you need it only once, when the fieldset is created. The best way to handle this is to add a method to y…
Comment by
WanWizard
March 2016
permalink
Needing a Freelancer/Developer
I've send you a private message.
Comment by
WanWizard
March 2016
permalink
Creating New Propert from Observer
You define an Observer method like so: public function before_save(\Orm\Model $obj) { } The ORM model object on which the Observer runs is passed on the method in $obj. So you can do stuff like: // change a column value if ($o…
Comment by
WanWizard
March 2016
permalink
Soft Delete Does Not Restore Relation Once Restored
Sorry, Fuel is on GMT, London time.
Comment by
WanWizard
March 2016
permalink
Soft Delete Does Not Restore Relation Once Restored
Afaik relations are not soft-deleted, so they can not be restored. You might want to ping Steve on IRC to get that confirmed, I've never used soft delete myself.
Comment by
WanWizard
March 2016
permalink
Check if Soft Deleted on Login?
Ok. You can ping Steve on IRC if you need more info, ORM is more his thing.
Comment by
WanWizard
March 2016
permalink
Quick Suggestion
Done with a bit of awk ;-)
Comment by
WanWizard
March 2016
permalink
Quick Suggestion
Ah, ok, get it. Not quite so easy to modify, the logo is added via css, and the pages are all hardcoded HTML, so quite a lot to change. I'll see if I can find an easy way to change it.
Comment by
WanWizard
March 2016
permalink
Escaping of HTML characters
Just make sure you manually encode everything your views output, to avoid security holes!
Comment by
WanWizard
February 2016
permalink
Check if Soft Deleted on Login?
None of the Auth implementations support Soft Delete out of the box. You'll have to create your own Model_User, by copying it from the Auth package to your app, and then have it extend \Orm\Model_Soft instead of Orm\Model. And perhaps other …
Comment by
WanWizard
February 2016
permalink
Problem in setup a project in FuelPhp
I don't know what you installed, and why it doesn't work, I can't guess from the little information you give me. The root of the installation should have a composer.json file, and it should contain: https://github.com/fuel/fuel/blob/…
Comment by
WanWizard
February 2016
permalink
Problem in setup a project in FuelPhp
Bitbucket? Fuel has never been on bitbucket? The public repo is https://github.com/fuel/fuel, or you can download a zip from http://fuelphp.com/downloads. The latest version is 1.7.3, a 1.8 release is expected within a few weeks.
Comment by
WanWizard
February 2016
permalink
Problem in setup a project in FuelPhp
How did you install? What version of Fuel? The problem is that composer doesn't install the dependencies. I see it has a composer.lock file, can you remove that, and run "composer install" again?
Comment by
WanWizard
February 2016
permalink
Autoload a module?
In general, if your "seperated code" contains frontend code, i.e. a controller, create a module. If it doesn't, create a package. However, both need to be loaded before they can be used, which you can do in the always_load section of…
Comment by
WanWizard
February 2016
permalink
Returning a response in a REST Controller before() method
No, the before() method is a prepping method, it has no option to return anything. Ideally it should not abort as well, although technically you can, either via an exception, or via a redirect. If you want generic access checks, it's probably …
Comment by
WanWizard
February 2016
permalink
Autoload a module?
No. You can not call anything in the module until the autoloader knows the modules' namespace, and knows where it is on disk. So you need to use either Module::load() first, or define the module in the always_load section of your config. Havi…
Comment by
WanWizard
February 2016
permalink
Delete account query
Account deleted. ;-)
Comment by
WanWizard
February 2016
permalink
Escaping of HTML characters
Fuel doesn't strip on input, it encodes on output. We find that the behaviour of other frameworks that do strip or filter on input do it wrong, in that you loose input data, you have to do complicated things when you don't want to strip …
Comment by
WanWizard
February 2016
permalink
Quick Suggestion
Correct observation, it's a shortcut to the homepage. Why in your opinion should it go to the documentation?
Comment by
WanWizard
February 2016
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,368
Last Active
5:23PM
Roles
Administrator