rtconner / laravel-likeable

Trait for Laravel Eloquent models to allow easy implementation of a "like" or "favorite" or "remember" feature.
MIT License
401 stars 49 forks source link

Request: Update Documentation. #14

Closed The1NdNly closed 8 years ago

The1NdNly commented 8 years ago

Hello, Being fairly new to Laravel I still have to reference documentation most of the time to integrate packages to my app. While going about installing this I noticed the documentation if outdated.

composer require rtconner/laravel-likeable "~1.0"

Should be V1.1 for 5.2?

'providers' => array(
    Conner\Likeable\LikeableServiceProvider::class,
);

and

class Article extends \Illuminate\Database\Eloquent\Model {
    use Conner\Likeable\LikeableTrait;
}

are outdated, i assume its the paths since i believe the package has had its file structure updated to rtconner\laravel-likeable\src\LikeableTrait ?

Also while running php artisan vendor:publish --provider="Conner\Likeable\LikeableServiceProvider" i get a Nothing to publish for tag []. error. Again i assume its to do with the path?

After moving and migrating the migrations manually and running them i either get a LikeableTrait' not found error while trying to include it to my model. If i playaround with the file path to try and point it to the new one (both in app.php and the model) im getting a unexpected "-" error due to the file path having a "-" in "laravel-likeable"

Any help would be appreciated, im sure its just something basic im failing to do. hopefully with the docs updated it should avoid other novices having the same issue.

Kind regards, Matt

The1NdNly commented 8 years ago

I’ve been playing around trying to get this to work with no luck. just keep getting Nothing to publish for tag [] & FEE Trait 'App\Conner\Likeable\LikeableTrait' not found

Any ideas? iv'e ran php artisan config:clear but its still stuck. a bug maybe?

rtconner commented 8 years ago

Ok I'll do a release in the next day or two

The1NdNly commented 8 years ago

Thankyou

JesusLeon commented 8 years ago

Hi @rtconner, do you need help with this? I will take a look at your code and see what can I do.

rtconner commented 8 years ago

I haven't had much free time to work on this. Trying to when I can.

rtconner commented 8 years ago

Looking at your comments, I think you just need a slash at the beginning?

use \Conner\Likeable\LikeableTrait;

rtconner commented 8 years ago

Ok this should all be fixes in version 1.2.0

The1NdNly commented 8 years ago

Just an update, on a fresh install of laravel the doc's are still incorrect. you need to include like this.

use Conner\Likeable\LikeableTrait;
class Article extends Model  {

use LikeableTrait;
khoerodin commented 8 years ago

Thanks @The1NdNly