LaravelLover

LaravelLover

Member Since 2 Years Ago

Experience Points 370
Experience Level 1

4,630 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed 0
Lessons
Completed
Best Reply Awards 0
Best Reply
Awards
  • start-engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

11 Sep
1 week ago

LaravelLover left a reply on UniSharp Filemanager Not Working With Laravel!

I fixed this with the following method..

Went to public folder and delete the "storage" file.

then ran "php artisan storage:link" and it worked!

09 Sep
1 week ago
08 Sep
1 week ago

LaravelLover started a new conversation UniSharp Filemanager Not Working With Laravel!

Hello Guys

I'm having some issues with laravel 5.8.30 and unisharp file manager 2.0...

I can uploads files and they got to relevant folders but the file manager wont show it in the backend. Manually browsing the images wont show either!

My lfm.php looks something like this..

return [ /* |-------------------------------------------------------------------------- | Routing |-------------------------------------------------------------------------- */

'use_package_routes'       => false,

// // Use relative paths (without domain)
'relative_paths'           => false,

// The url to this package. Change it if necessary.
'url_prefix'               => config('admin.route.prefix') . '/uploads',

/*
|--------------------------------------------------------------------------
| Multi-User Mode
|--------------------------------------------------------------------------
 */

'allow_multi_user'         => false,

'allow_share_folder'       => false,

/*
|--------------------------------------------------------------------------
| Folder Names
|--------------------------------------------------------------------------
 */

// Flexible way to customize client folders accessibility
// If you want to customize client folders, publish tag="lfm_handler"
// Then you can rewrite userField function in App\Handler\ConfigHandler class
// And set 'user_field' to App\Handler\ConfigHandler::class
// Ex: The private folder of user will be named as the user id.
'user_folder_name'         => UniSharp\LaravelFilemanager\Handlers\ConfigHandler::class,

// 'shared_folder_name'       => 'shares',

'thumb_folder_name'        => 'thumbs',

'folder_categories'        => [
    'product'  => [
        'folder_name'  => 'product',
        'startup_view' => 'grid',
        'max_size'     => 30000, // size in KB
        'valid_mime'   => [
            'image/jpeg',
            'image/pjpeg',
            'image/png',
            'image/gif',
            'image/svg+xml',
        ],
    ],

    'category' => [
        'folder_name'  => 'category',
        'startup_view' => 'grid',
        'max_size'     => 30000, // size in KB
        'valid_mime'   => [
            'image/jpeg',
            'image/pjpeg',
            'image/png',
            'image/gif',
            'image/svg+xml',
        ],
    ],

    'brand'    => [
        'folder_name'  => 'brand',
        'startup_view' => 'grid',
        'max_size'     => 30000, // size in KB
        'valid_mime'   => [
            'image/jpeg',
            'image/pjpeg',
            'image/png',
            'image/gif',
            'image/svg+xml',
        ],
    ],

    'vendor'   => [
        'folder_name'  => 'vendor',
        'startup_view' => 'grid',
        'max_size'     => 30000, // size in KB
        'valid_mime'   => [
            'image/jpeg',
            'image/pjpeg',
            'image/png',
            'image/gif',
            'image/svg+xml',
        ],
    ],

    'language' => [
        'folder_name'  => 'language',
        'startup_view' => 'grid',
        'max_size'     => 30000, // size in KB
        'valid_mime'   => [
            'image/jpeg',
            'image/pjpeg',
            'image/png',
            'image/gif',
            'image/svg+xml',
        ],
    ],

    'currency' => [
        'folder_name'  => 'currency',
        'startup_view' => 'grid',
        'max_size'     => 30000, // size in KB
        'valid_mime'   => [
            'image/jpeg',
            'image/pjpeg',
            'image/png',
            'image/gif',
            'image/svg+xml',
        ],
    ],

    'logo'     => [
        'folder_name'  => 'logo',
        'startup_view' => 'grid',
        'max_size'     => 50000, // size in KB
        'valid_mime'   => [
            'image/jpeg',
            'image/pjpeg',
            'image/png',
            'image/gif',
            'image/svg+xml',
        ],
    ],

    'content'  => [
        'folder_name'  => 'content',
        'startup_view' => 'grid',
        'max_size'     => 30000, // size in KB
        'valid_mime'   => [
            'image/jpeg',
            'image/pjpeg',
            'image/png',
            'image/gif',
            'image/svg+xml',
        ],
    ],
    'page'     => [
        'folder_name'  => 'page',
        'startup_view' => 'grid',
        'max_size'     => 30000, // size in KB
        'valid_mime'   => [
            'image/jpeg',
            'image/pjpeg',
            'image/png',
            'image/gif',
            'image/svg+xml',
        ],
    ],

    'avatar'     => [
        'folder_name'  => 'avatar',
        'startup_view' => 'grid',
        'max_size'     => 30000, // size in KB
        'valid_mime'   => [
            'image/jpeg',
            'image/pjpeg',
            'image/png',
            'image/gif',
            'image/svg+xml',
        ],
    ],

    'other'    => [
        'folder_name'  => 'other',
        'startup_view' => 'grid',
        'max_size'     => 30000, // size in KB
        'valid_mime'   => [
            'image/jpeg',
            'image/pjpeg',
            'image/png',
            'image/gif',
            'image/svg+xml',
        ],
    ],

    'banner'   => [
        'folder_name'  => 'banner',
        'startup_view' => 'grid',
        'max_size'     => 50000, // size in KB
        'valid_mime'   => [
            'image/jpeg',
            'image/pjpeg',
            'image/png',
            'image/gif',
            'image/svg+xml',
        ],
    ],

    'file'     => [
        'folder_name'  => 'file',
        'startup_view' => 'list',
        'max_size'     => 50000, // size in KB
        'valid_mime'   => [
            'image/jpeg',
            'image/pjpeg',
            'image/png',
            'image/gif',
            'image/svg+xml',
            'application/pdf',
            'text/plain',
        ],
    ],

    'manager'  => [
        'folder_name'  => '',
        'startup_view' => 'list',
        'max_size'     => 50000, // size in KB
        'valid_mime'   => [
            'image/jpeg',
            'image/pjpeg',
            'image/png',
            'image/gif',
            'image/svg+xml',
            'application/pdf',
            'text/plain',
        ],
    ],
],

/*
|--------------------------------------------------------------------------
| Upload / Validation
|--------------------------------------------------------------------------
 */

'disk'                     => 'public',

'rename_file'              => false,

'alphanumeric_filename'    => false,

'alphanumeric_directory'   => false,

'should_validate_size'     => false,

'should_validate_mime'     => false,

// permissions to be set when create a new folder or when it creates automatically with thumbnails
'create_folder_mode'       => 0755,

// permissions to be set on file upload.
'create_file_mode'         => 0644,

// If true, it will attempt to chmod the file after upload
'should_change_file_mode'  => true,

// behavior on files with identical name
// setting it to true cause old file replace with new one
// setting it to false show `error-file-exist` error and stop upload
'over_write_on_duplicate'  => true,

/*
|--------------------------------------------------------------------------
| Thumbnail
|--------------------------------------------------------------------------
 */

// If true, image thumbnails would be created during upload
'should_create_thumbnails' => true,

// Create thumbnails automatically only for listed types.
'raster_mimetypes'         => [
    'image/jpeg',
    'image/pjpeg',
    'image/png',
],

'thumb_img_width'          => 200,

'thumb_img_height'         => 200,

/*
|--------------------------------------------------------------------------
| jQuery UI options
|--------------------------------------------------------------------------
 */

'resize_aspectRatio'       => false,

'resize_containment'       => true,

/*
|--------------------------------------------------------------------------
| File Extension Information
|--------------------------------------------------------------------------
 */

'file_type_array'          => [
    'pdf'  => 'Adobe Acrobat',
    'doc'  => 'Microsoft Word',
    'docx' => 'Microsoft Word',
    'xls'  => 'Microsoft Excel',
    'xlsx' => 'Microsoft Excel',
    'zip'  => 'Archive',
    'gif'  => 'GIF Image',
    'jpg'  => 'JPEG Image',
    'jpeg' => 'JPEG Image',
    'png'  => 'PNG Image',
    'ppt'  => 'Microsoft PowerPoint',
    'pptx' => 'Microsoft PowerPoint',
],

'file_icon_array'          => [
    'pdf'  => 'fa-file-pdf-o',
    'doc'  => 'fa-file-word-o',
    'docx' => 'fa-file-word-o',
    'xls'  => 'fa-file-excel-o',
    'xlsx' => 'fa-file-excel-o',
    'zip'  => 'fa-file-archive-o',
    'gif'  => 'fa-file-image-o',
    'jpg'  => 'fa-file-image-o',
    'jpeg' => 'fa-file-image-o',
    'png'  => 'fa-file-image-o',
    'ppt'  => 'fa-file-powerpoint-o',
    'pptx' => 'fa-file-powerpoint-o',
],

/*
|--------------------------------------------------------------------------
| php.ini override
|--------------------------------------------------------------------------
|
| These values override your php.ini settings before uploading files
| Set these to false to ingnore and apply your php.ini settings
|
| Please note that the 'upload_max_filesize' & 'post_max_size'
| directives are not supported.
 */
'php_ini_overrides'        => [
    'memory_limit' => '256M',
],

];

any help please?

29 Aug
3 weeks ago

LaravelLover left a reply on Laravel 3 Table Relationship

Thanks @janosk and @punksolid !

That was exactly i was looking for! i used many to many with sync method and works like a charm to add/update

https://laravel.com/docs/5.5/eloquent-relationships#updating-many-to-many-relationships

Really appreciating the community for all the quick helps!

28 Aug
3 weeks ago

LaravelLover started a new conversation Laravel 3 Table Relationship

i need some help with laravel relationship as im bit confused with which relationship to use here..

So i have 3 tables

  1. Roles

i) id ii) name

  1. Permissions

i) id ii) name

  1. role_has_permissions

i) role_id ii) permission_id

Single role can have multiple permissions

how do i manage my relationship for those 3 tables?

Any help is really appreciated!

23 Jan
2 years ago

LaravelLover left a reply on Laravel 5.3 Not Showing Images On Localhost:8000

@mrabbani that gives me the same url for the image..

LaravelLover left a reply on Laravel 5.3 Not Showing Images On Localhost:8000

Thanks @WebDO but i've tried everything and nothing had worked so far! is there any function that give me asseth path rather then localhost:8000?

LaravelLover started a new conversation Laravel 5.3 Not Showing Images On Localhost:8000

Hello Guys,

im trying to get images from my public directory but the image couldnt be loaded..

ive used :-

  1. assets
  2. URL
  3. HTML

but all of them give the same path localhost:8000/public/images/image.jpg and it doesnt load the image at all..if i view the image via localhost/myproject/public/images/image.jpg it works fine..don't know what i've done wrong..

any help would be really appreciated!!

LaravelLover left a reply on How To Get Metadata For Post Or Page In Laravel 5.3

sorted another way!

my controller

public function index()
   {
       $products  = DB::table('products')->orderby('id', 'desc')->paginate(10);
       $page_meta = DB::table('page_meta')->get();
       $meta      = [];

       foreach ($page_meta as  $value) {
           $meta[$value->page_id][$value->key] = $value->value;
       }
       return view('admin.product.list-product', ['products' => $products, 'product_meta'=>$meta]);
   }

blade view

<tbody>
                           @foreach($products as $product)
                           <tr>
                               <td>
                                   {{ $product->title }}
                               </td>

                               <td>
                                   ${{ $product_meta[$product->id]['regular_price'] }}
                               </td>
                               <td>
                                   {{ $product_meta[$product->id]['stock_qty'] }}
                               </td>
                               <td>
                                   <span class="label label-primary">Enable</span>
                               </td>
                               <td class="text-right">
                                   <div class="btn-group">
                                       <a href="javascript:void()" class="btn-white btn btn-xs">View</a>
                                       <a href="{{ route('product.edit', $product->id) }}" class="btn-white btn btn-xs">Edit</a>
                                   </div>
                               </td>
                           </tr>
                           @endforeach

is it ok to do like that?

20 Jan
2 years ago

LaravelLover left a reply on How To Get Metadata For Post Or Page In Laravel 5.3

Thanks for the reply but i want something different..i'm listing product and need some meta as well..sorry if i didn't explain enough!

below is my code:

 $products  = DB::table('products')->orderby('id','desc')->paginate(10);
 return view('admin.product.list-product', ['products' => $products]);

how do i pass the meta's for each product to the view?

LaravelLover started a new conversation How To Get Metadata For Post Or Page In Laravel 5.3

Hello Devs,

I'm doing a project in Laravel 5.3 where i have to get data from 2 tables..one is post and another is post meta...posts id may have one or multiple post meta's same as WordPress...i'm not sure how can i get those post meta data to the Laravel blade view..

I'm fairly new to Laravel so i was wondering how this can be achieved..

Thanks in advanced!!