Mam taką zagwozdkę w Laravel 5.4 - zainstalowałem z konsoli cały panel rejestracji.logowania, teraz testy i poznawanie frameworku. Jest w kontrolerze RegisterController:
class RegisterController extends Controller { }
gdzie klasa dziedziczy po Controller z danej metody tej klasy chciałbym mieć dostęp do zmiennej $table, która zdefiniowana jest w pliku User.php:
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable {
use Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [ 'login', 'password' ];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [ 'password', 'remember_token', ];
protected $table = 'MyTable';
}
Jak mam się do nie dobrać, wielodziedziczenie nie występuje ...