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
8243
Activity
FuelPHP vs Laravel vs based on FuelPHP framework
You are correct in that our answer will always be biased. There are a couple of things we value, and laravel doesn't offer: - simplicity, ease of use (easy to understand API) - light weight (laravel pulls half of symfony in these days) - long…
Comment by
WanWizard
January 2015
permalink
How do I protect string?
Have you tried it? Unlike many (if not all) other frameworks, FuelPHP doesn't strip on input, it encodes on output. The main reasoning behind this is that all stripping makes you lose input data. Just create a view that contains: And a con…
Comment by
WanWizard
January 2015
permalink
How do I protect string?
What is wrong with that string? Looks like a fine string to me? Perhaps you should start by explaining or describing exactly what you want?
Comment by
WanWizard
January 2015
permalink
Caching results in high memory usage
We're aware of this, there is an issue open for it. Currently the browscap file is getting so big that is has become difficult to handle. The short term workaround is, if you have access to your php.ini, use PHP's built-in support. Agent …
Comment by
WanWizard
January 2015
permalink
find_one_by // Warning
I have to look into the code to see how this exactly works, as I said I never use this. find_by_article_id($id) works here btw, and returns a single object. So perhaps it is the "by_one" that is not supported, but only "find_by&quo…
Comment by
WanWizard
January 2015
permalink
find_one_by // Warning
I never use this notation, but I think your syntax is wrong: $entry = Model_Article_Illustration::find_one_by_article_id($id); I think the fieldname is part of the method name...
Comment by
WanWizard
January 2015
permalink
Problems add EAV to ORM model
That is not how EAV works. You need to define the a standard has_many relation first, like you would do for any related model. So your Model_Refurbishing is missing a has_many: 'attributes' => array( 'key_fro…
Comment by
WanWizard
January 2015
permalink
Update fuel 1.7.2 zip link
I know that, the previous remark still applies unfortunately. Good news is there's a 1.7.3 on the way, that would also solve that problem.
Comment by
WanWizard
January 2015
permalink
Editor for Ormauth ACLs
Yes. But unfortunately, as it is part of our commercial app framework, we can't open source it. It was already a struggle to get Ormauth added (which was designed for the same app framework).
Comment by
WanWizard
January 2015
permalink
know Users loggued
No, there is no mechanism, as session expiry is client-side. Usually the combination of both user-id and last-update date is taken to determine if a user is logged-in or not, for example, a user seen in the last 15 minutes is considered logged-in.
Comment by
WanWizard
January 2015
permalink
Insert array of data to database
You can pass a multi-dimensional array to DB::insert()->values(), containing multiple rows. It will generate a multi-row INSERT from that.
Comment by
WanWizard
January 2015
permalink
know Users loggued
Every ORM model needs a primary key, and if you don't define it, it defaults to "id", so that is very well possible. I would not define "user_id" as PK though, since it doesn't have to be unique (a user can login with …
Comment by
WanWizard
January 2015
permalink
know Users loggued
Ormauth or Simpleauth? In case of Ormauth, you need to extend the user model in your app (like you did with the session driver), because you need to define the relation both ways, and you should not make modifications to the Auth models directory. …
Comment by
WanWizard
January 2015
permalink
know Users loggued
Sessions are written at the end of the request, so no need to deal with that, after the user has logged out, the user_id written to the table with be 0 ( = a guest user). Read up on extending core classes: http://fuelphp.com/docs/general/extending_…
Comment by
WanWizard
January 2015
permalink
know Users loggued
What would you want to do with that? Auth itself already registers the user in the session, so no need to do that twice. Sessions however are personal, they can not be queried, so how would you list who is logged in? To be able to query it, it nee…
Comment by
WanWizard
January 2015
permalink
MAMP - php oil refine migrate causes error
When it comes to using PHP and Fuel on the commandline, there are two things you have to take into account: There is a known issue on the Mac, which has to do with the fact that MAMP uses a non-standard location for the php.ini file. This causes ph…
Comment by
WanWizard
January 2015
permalink
Inser Cascade with orm
You're not deleting anything, you're adding here? What exactly do you want to delete? The parent object? The related objects? Only the relation between the two? I see more issues here. You pass a variable $id in the action method, but …
Comment by
WanWizard
January 2015
permalink
Admin Scaffolding, please explain
Documentation is always very difficult to get right, and it takes a lot of time to create and maintain it. For the current release, the documentation is based around the API, which means it is not suited to beginners, who would like to be lead more…
Comment by
WanWizard
January 2015
permalink
Admin Scaffolding, please explain
I personally have never seen the fun of code generation in it's current form. I use it on occasion if I need a quick crud form and don't have phpmyadmin available, but never for apps. After you have build your first Fuel app the way you w…
Comment by
WanWizard
January 2015
permalink
Admin Scaffolding, please explain
Scaffolding generates html, depending on your settings also the model, migrations, etc. Nothing more. There is no authentication involved. Admin scaffolding generates code protected by Auth. It also has a bootstrap based menu system in which the ge…
Comment by
WanWizard
January 2015
permalink
EMAIL - Email attachment not found: title.png
There are probably images in your HTML. When you send that as an email, the images have to be removed from it, attached to the email, and the links to them replaced by cid links to the attached images. Check your html, and make sure all assets exi…
Comment by
WanWizard
January 2015
permalink
ORMAUTH - get user by id function
You can use array notation and the second parameter of find() to define relations to include (which I personally hate), or use method chaining. $result = \Model1::query()->related('model2')->related('model2.model3')->ge…
Comment by
WanWizard
January 2015
permalink
ORMAUTH - get user by id function
Simply use the model, like you would any other model: $user = \Model\Auth_User::find(2);
Comment by
WanWizard
January 2015
permalink
How to list items while related item has or has no data?
Which proves my point that your filter or conditions are nor correct. So do what i asked, run the query without conditions, get the generated SQL from the profiler, and add your conditions manually. The ORM generates in specific cases quite compli…
Comment by
WanWizard
January 2015
permalink
How to list items while related item has or has no data?
What relation is it exactly? If I check the code, both has_many and many_many should construct a LEFT JOIN, so it should include the parent even if it doesn't have any children. I have a feeling it's your filter the causes the problem. …
Comment by
WanWizard
January 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,384
Last Active
7:13PM
Roles
Administrator