kodeine / laravel-meta

Fluent Meta Data for Eloquent Models, as if it is a property on your model
MIT License
400 stars 90 forks source link

I cannot use laravel-meta in laravel 6 ? #68

Closed Ladinstar closed 4 years ago

Ladinstar commented 5 years ago

image I have install this package in my laravel 6 project. Here is the model that i want to use for `<?php

namespace App;

use Illuminate\Contracts\Auth\MustVerifyEmail; use Illuminate\Notifications\Notifiable; use Illuminate\Foundation\Auth\User as Authenticatable; use App\Permissions\HasPermissionsTrait; use Laravel\Passport\HasApiTokens;

use Kodeine\Metable\Metable;

class User extends Authenticatable { use Notifiable, HasPermissionsTrait, HasApiTokens;

use Metable;

protected $metaTable = 'users_meta';

/**
 * The attributes that are mass assignable.
 *
 * @var array
 */
protected $fillable = [
    'name', 'email', 'password',
];

/**
 * The attributes that should be hidden for arrays.
 *
 * @var array
 */
protected $hidden = [
    'password', 'remember_token',
];

public function products()
{
    return $this->hasMany(Product::class);
}

} ` I respect all steps that you ask to install it but i have this error. Do you know why and how i can do to resolve this problem ? Thank You !

guney commented 5 years ago

String helpers and the other ones are removed from the Laravel core repository and moved into laravel/helpers repository as a dependency. Simply run composer require laravel/helpers to let laravel-meta to continue using helpers like camel_case.