herrygallery

Experience

90

0 Best Reply Awards

  • Member Since 6 Months Ago
  • 0 Lessons Completed
  • 0 Favorites

16th May, 2018

herrygallery left a reply on Problem In App Service Provider • 3 months ago

@tykus thanks for the suggestions. I will try that, its new for me. Using DB query inside the View share is just so convenient, because I have so many options regarding user preference e.g. colors, thumbnail image per row, collapse in/out, pagination, width and height of sketchpad js, etc.

herrygallery started a new conversation Problem In App Service Provider • 3 months ago

Problem:

In Providers - App Service Provider, I wrote :

View::share('publicoption', DB::table('options')->first());

Then I manually drop all of my tables from XAMPP including Options table above to test my migration and seed. Then got error :

SQLSTATE[42S02]: Base table or view not found: 1146

If I delete the above code in the App Service Provider, everything works OK.

Is my code wrong? Do I have to adjust the code in App Service Provided to refresh my tables?

Thanks

10th February, 2018

herrygallery left a reply on Adding Picture When Register • 6 months ago

I wanna do the same. At first, I try with the usual $request->file('image') etc etc.. but didnt work.

3rd February, 2018

herrygallery left a reply on Count In A Blade Foreach Loop -is There A Better Way? • 6 months ago

I try this:

In Controller: $author = Author::findOrFail($id);

In View: @foreach ($author->books as $book) @endforeach

Amount of books by this author: {{ count($author->books) }}

herrygallery left a reply on How To Count @foreach Loop With Condition? • 6 months ago

I try this and it works:

In Controller: $author = Author::findOrFail($id);

In View: @foreach ($author->books as $book) @endforeach

Amount of books by this author: {{ count($author->books) }}

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.