Comments (13)
I took a closer look into the stack dump produced by L4.
I have a C++ background so the PHP keywords are different, but I can tell your goal is to override the save functionality provided by the base class Eloquent. However, this isn't occurring -- save() directly calls the Eloquent
save method and never hits anything from Ardent
or from confide
from confide.
Well that should be removed before it tries to save. in src/Zizaco/Confide/ConfideUser.php
/**
* Ardent method overloading:
* Before save the user. Generate a confirmation
* code if is a new user.
*
* @param bool $forced Indicates whether the user is being saved forcefully
* @return bool
*/
public function beforeSave( $forced = false )
{
if ( empty($this->id) )
{
$this->confirmation_code = $this->generateUuid($this->table, 'confirmation_code');
}
/*
* Remove password_confirmation field before save to
* database.
*/
if ( isset($this->password_confirmation) )
{
unset( $this->password_confirmation );
}
return true;
}
from confide.
Interesting that it isn't hitting ardent or confide... I'll have to troubleshoot it to confirm this.
from confide.
Yes, I located the above code -- note my most recent response, the stack dump shows that the call to save() is never hitting Ardent or Confide. See here: http://i.imgur.com/f58j5hD.png
from confide.
Can I have look at your User Model?
from confide.
Maybe in a gist?
from confide.
Standard model from the install: http://paste.laravel.com/q1i (I can do gist also, but this should work).
I don't understand why it extends Eloquent -- this seems wrong, but I don't know much about PHP. I thought it would extend ConfideUser or Ardent.
from confide.
Ah that'll do it. Your thought is correct. Try this instead:
<?php
use Zizaco\Confide\ConfideUser;
class User extends ConfideUser {
/*Super awesome code here*/
}
from confide.
Awesome, so my C++ knowledge works in PHP, I was pretty sure that was wrong but forgot to add in the use Zizaco\Confide\ConfideUser;
when I tried making the change myself.
How has it worked up until now with it like this?
from confide.
I dunno? Magic? I kid, but seriously not sure.
and glad your C++ is working in PHP as well. You've picked the right framework to get familiar with PHP.
from confide.
Considering solving this by writing a new ModelCommand
, similar to ControllerCommand
, etc.
Comments?
from confide.
If you're looking for more command line generators, I'd take a look at https://github.com/JeffreyWay/Laravel-4-Generators
from confide.
"Closing since the issue was resolved, but doesn't mean we have to the conversation."
from confide.
Related Issues (20)
- Too many assumptions that email implies a unique user - it seldom does in mature systems
- Serialization of 'Closure' is not allowed HOT 6
- Email subject in config HOT 2
- hash method and user data migrate
- How to set my own view for password reset? HOT 1
- Laravel 5 Support? HOT 3
- SMS registration HOT 1
- Deactivate user? HOT 2
- erroneous error: The credentials provided have already been used. Try with different credentials HOT 1
- Getting wrong confirmation code while registering with username and email id containing dot(.)
- composer update for laravel 5 does not work HOT 4
- 5.0.x-dev: Missing file 'tests/Confide/helpers.php' throws Fatal error during `artisan clear-compiled` HOT 1
- When I create file with using '$ php artisan confide:migration', that file's path is wrong.
- Username not accepting "." HOT 1
- Support for Laravel 5.1 HOT 2
- Confide 4.3 is full of bug HOT 1
- Class 'Zizaco\Confide\UserValidator' not found
- Wrong confirmation code
- Warning: Ambiguous class resolution, "ConfideSetupUsersTable"
- laravel 5.1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from confide.