Welcome Guest, Not a member yet? Register   Sign In
Myth:Auth
#47

Nice work and nice package!

I have question

How to extends user model & user entities ?. I get this error when try to load getDisplayName() function on Entities

Quote:ErrorException #1

Class 'Myth\Auth\Entities\User' not found




app/Entities/User.php


PHP Code:
<?php namespace App\Entities;

class 
User extends \Myth\Auth\Entities\User
{
    public function 
getDisplayName()
    {
        return 
'test';
    }


app/Models/UserModel.php

PHP Code:
<?php namespace App\Models;

class 
UserModel extends \Myth\Auth\Models\UserModel
{
protected 
$returnType 'App\Entities\User';
    protected $allowedFields = [
        'email''username''password_hash''reset_hash''reset_at''reset_expires''activate_hash',
        'status''status_message''active''force_pass_reset''permissions''deleted_at',
        'firstname''lastname''phone',
    ];


Thanks
Reply


Messages In This Thread
Myth:Auth - by kilishan - 12-11-2019, 10:49 PM
RE: Myth:Auth - by MGatner - 12-12-2019, 04:31 AM
RE: Myth:Auth - by InsiteFX - 12-12-2019, 05:46 AM
RE: Myth:Auth - by Basic App - 12-17-2019, 07:33 AM
RE: Myth:Auth - by MGatner - 12-17-2019, 07:36 AM
RE: Myth:Auth - by Basic App - 12-17-2019, 08:52 AM
RE: Myth:Auth - by kilishan - 12-17-2019, 08:56 AM
RE: Myth:Auth - by skechav - 01-02-2020, 02:32 PM
RE: Myth:Auth - by BilltheCat - 02-02-2020, 06:18 PM
RE: Myth:Auth - by InsiteFX - 02-03-2020, 08:56 AM
RE: Myth:Auth - by BilltheCat - 02-03-2020, 09:45 AM
RE: Myth:Auth - by muuucho - 04-13-2020, 10:52 PM
RE: Myth:Auth - by destez - 04-21-2020, 01:30 AM
RE: Myth:Auth - by InsiteFX - 04-21-2020, 03:29 AM
RE: Myth:Auth - by destez - 04-21-2020, 03:36 AM
RE: Myth:Auth - by InsiteFX - 04-24-2020, 08:06 AM
RE: Myth:Auth - by destez - 04-24-2020, 03:29 PM
RE: Myth:Auth - by InsiteFX - 04-25-2020, 08:21 AM
RE: Myth:Auth - by destez - 04-25-2020, 08:41 AM
RE: Myth:Auth - by destez - 04-25-2020, 03:08 PM
RE: Myth:Auth - by nfaiz - 04-25-2020, 06:17 PM
RE: Myth:Auth - by dodjiD - 06-20-2020, 07:29 PM
RE: Myth:Auth - by jim1001 - 08-07-2020, 08:08 AM
RE: Myth:Auth - by InsiteFX - 08-08-2020, 10:36 AM
RE: Myth:Auth - by jim1001 - 08-09-2020, 10:53 AM
RE: Myth:Auth - by InsiteFX - 08-09-2020, 11:09 AM
RE: Myth:Auth - by jim1001 - 08-18-2020, 04:26 AM
RE: Myth:Auth - by jim1001 - 08-18-2020, 06:57 AM
RE: Myth:Auth - by InsiteFX - 08-18-2020, 08:53 AM
RE: Myth:Auth - by MGatner - 08-18-2020, 10:08 AM
RE: Myth:Auth - by jim1001 - 08-18-2020, 11:34 AM
RE: Myth:Auth - by jim1001 - 08-19-2020, 09:59 AM
RE: Myth:Auth - by InsiteFX - 08-19-2020, 12:08 PM
RE: Myth:Auth - by jim1001 - 08-19-2020, 01:23 PM
RE: Myth:Auth - by aschmitz - 11-08-2020, 09:33 AM
RE: Myth:Auth - by InsiteFX - 11-08-2020, 12:06 PM
RE: Myth:Auth - by aschmitz - 11-09-2020, 03:46 PM
RE: Myth:Auth - by MGatner - 11-10-2020, 05:43 AM
RE: Myth:Auth - by aschmitz - 11-10-2020, 08:42 AM
RE: Myth:Auth - by suvi - 11-12-2020, 05:27 AM
RE: Myth:Auth - by InsiteFX - 11-13-2020, 01:06 AM
RE: Myth:Auth - by suvi - 11-13-2020, 06:11 AM
RE: Myth:Auth - by InsiteFX - 11-13-2020, 01:08 PM
RE: Myth:Auth - by suvi - 11-15-2020, 09:19 AM
RE: Myth:Auth - by InsiteFX - 11-15-2020, 01:56 PM
RE: Myth:Auth - by suvi - 11-15-2020, 03:54 PM
RE: Myth:Auth - by lan89 - 12-05-2020, 01:39 PM
RE: Myth:Auth - by MGatner - 12-06-2020, 05:33 AM
RE: Myth:Auth - by lan89 - 12-06-2020, 06:26 AM
How to use the invitation feature? - by suvi - 12-30-2020, 06:29 AM
RE: Myth:Auth - by InsiteFX - 12-31-2020, 04:09 AM
RE: Myth:Auth - by suvi - 12-31-2020, 08:18 AM
RE: Myth:Auth - by MGatner - 12-31-2020, 08:20 AM
RE: Myth:Auth - by suvi - 12-31-2020, 12:41 PM
RE: Myth:Auth - by MGatner - 01-01-2021, 06:52 AM
RE: Myth:Auth - by suvi - 01-02-2021, 01:40 PM
RE: Myth:Auth - by klj - 01-08-2021, 03:42 AM



Theme © iAndrew 2016 - Forum software by © MyBB