hackroot

hackroot

Web Designer at Brandsafric

Member Since 3 Months Ago

Experience Points
450
Total
Experience

4,550 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.

Level 1
450 XP
17 Sep
4 days ago

hackroot left a reply on Updating Laravel Framework From Version 5.4 To 5.8, I Got Errors Please Help

@resin Thanks a lot resin I can now run command php artisan route:cache successfully. However i cannot still access my project via its domain nor when i run php artisan serve. any help with that, the only error i get is "500 | Server Error"

hackroot left a reply on Updating Laravel Framework From Version 5.4 To 5.8, I Got Errors Please Help

Yeah sure

api.php

use Illuminate\Http\Request;

Route::middleware('auth:api')->get('/user', function (Request $request) { return $request->user(); });

hackroot started a new conversation Updating Laravel Framework From Version 5.4 To 5.8, I Got Errors Please Help

Hi so i am trying to upgrade from Laravel 5.4 to 5.8, after altering my composer.json and issuing the composer update command, the packages were updated however now i can't access my project and i receive the following error "500 | Server Error" in my browser and i had this warning in my terminal after the packages were update

Illuminate\Foundation\ComposerScripts::postUpdate php artisan optimize Configuration cache cleared! Configuration cached successfully! Route cache cleared!

In Route.php line 917:

Unable to prepare route [api/user] for serialization. Uses Closure.

Script php artisan optimize handling the post-update-cmd event returned with error code 1

The last command was in red "Script php artisan optimize handling the post-update-cmd event returned with error code 1"

PLease any help will be greatly appreciated. God Bless

19 Aug
1 month ago

hackroot left a reply on Can't Run Valet Install In Linux Terminal "command Not Found" Error

Hi, @diegoaurino with your guidance i figured my problem and resolved them. I noticed that the initial issue was with my user not having permit to use the /usr/share/ directory i solved it by giving my sudo user permissions over a specific folder in usr/share directory "www"

second issue had to do with my php not having the "php-xml" extension so i installed it and everything now works well. also I am not running composer with sudo. all works thanks to you : @tray2 and @hackroot , Thanks a lot

hackroot left a reply on Can't Run Valet Install In Linux Terminal "command Not Found" Error

Hi @diegoaurino , I am using a sudo user, and yes I have input the composer path into my .bashrc. Also i noticed that the application requires permission to use the directoty so i used the following command to give my user ownership to/usr/share/www/ directory. Now I get the follow error

"Your requirements could not be resolved to an installable set of packages."

hackroot left a reply on Can't Run Valet Install In Linux Terminal "command Not Found" Error

Hi, @tray2 I managed to get Valet working fine. However Laravel gives me the following error in red when i give command "laravel new blog" error=

The provided cwd "/usr/share/www/blog" does not exist.

Note please "www" is my valet parked folder

pardon my delay in reply please. Would be glad for any assiatance offered.

17 Aug
1 month ago

hackroot left a reply on Can't Run Valet Install In Linux Terminal "command Not Found" Error

Yeah I am trying to install this very package via composer, I have already required it However when I run "valet install" I get "command not found error" same with laravel installer package, I googled and it has something to do with adding composer to my $PATH which i have tried but still getting same error.

hackroot started a new conversation Can't Run Valet Install In Linux Terminal "command Not Found" Error

Hi, Please i recently installed Kali Linux and i have set up mariadb, composer and apache too however i want t replace Apache with Laravel Valet for linux. I have used composer required but i can't run valet install nor can I run Laravel new "project-name" either. I have set up composer path in my .bashrc but still getting same error;

enable programmable completion features (you don't need to enable

this, if it's already enabled in /etc/bash.bashrc and /etc/profile

sources /etc/bash.bashrc).

if ! shopt -oq posix; then if [ -f /usr/share/bash-completion/bash_completion ]; then . /usr/share/bash-completion/bash_completion elif [ -f /etc/bash_completion ]; then . /etc/bash_completion fi fi

export PATH="$PATH:$HOME/.composer/vendor/bin"

export PATH="$PATH:/usr/.local/bin/"

^G Get Help ^O Write Out ^W Where Is ^K Cut Text ^J Justify ^C Cur Pos ^X Exit ^R Read File ^\ Replace ^U Paste Text^T To Spell ^_ Go To Line

I would be very glad for any assistance. Thanks

12 Aug
1 month ago

hackroot started a new conversation One BREAD Multiple Tables In Laravel Voyager

Hi i am using voyager laravel and i wanted to know if it's possible to be able to display contents from different tables in a single Bread interface?

hackroot started a new conversation Integrating Extensions/packages Into Laravel Voyager, Is It Possible? How Do I Proceed?

Hi I am working on a eCommerce front-end and POS with inventory system using laravel voyager as back-end, i would really love to implement a forked and updated version of Steve Bauman's inventory system package or extension in to laravel, I would like to know if it's possible. if yes how do i get started?

my thought: I was thinking maybe i will manually create models and controllers and paste the code however how do i deal with the table migrations specifically because i would really love to see and manage them within voyager.

Below is the github repository for the laravel package i want to implement; https://github.com/Trexology/inventory

I am new to PHP laravel however i know my way around a little bit. Would really appreciate the help.

23 Jul
1 month ago

hackroot left a reply on Error Migrating Tables For Bitfumes/laravelAuth Package On Laravel 5.8

Thanks a lot I have been able to migrate the tables. Thanks alot @ejdelmonico , @Ty

hackroot left a reply on Error Migrating Tables For Bitfumes/laravelAuth Package On Laravel 5.8

Hi I just added the above to the boot method section however I got the following error

TOM.C [email protected] MINGW32 /c/xampp/htdocs/sales $ php artisan migrate

In AppServiceProvider.php line 26:

Class 'App\Providers\Schema' not found

hackroot started a new conversation Error Migrating Tables For Bitfumes/laravelAuth Package On Laravel 5.8

I installed a new laravel app and required the following package (https://github.com/bitfumes/laravel-multiauth) to handle admin, user login, authentication and roles. All is well but i can't seem to be able to migrate tables using the general "php artisan migrate", below is my error code please any assistance would be gladly accepted. Thanks. ------------------------------------Code----------------------------------------------------------------------

TOM.C [email protected] MINGW32 /c/xampp/htdocs/sales $ php artisan migrate Migration table created successfully. Migrating: 2014_1012000000_create_users_table

Illuminate\Database\QueryException : SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table users add unique u sers_email_unique(email))

at C:\xampp\htdocs\sales\vendor\laravel\framework\src\Illuminate\Database\Connection.php:664 660| // If an exception occurs when attempting to run a query, we'll format the error 661| // message to include the bindings with SQL, which will make this exception a 662| // lot more helpful to the developer instead of just the database's errors. 663| catch (Exception $e) {

664| throw new QueryException( 665| $query, $this->prepareBindings($bindings), $e 666| ); 667| } 668|

Exception trace:

1 PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes") C:\xampp\htdocs\sales\vendor\laravel\framework\src\Illuminate\Database\Connection.php:458

2 PDOStatement::execute() C:\xampp\htdocs\sales\vendor\laravel\framework\src\Illuminate\Database\Connection.php:458

Please use the argument -v to see more details.

28 Jun
2 months ago

hackroot left a reply on Sharing One Database For 2 Laravel Apps?

Hi please I would like some aid on the sharing two databases Issue discussed above; Thing is I created a point of sale project and now I want to create another laravel app an Ecommerce to be precised and i want to share my current users and product details with my new app. I want to create a "add to shop" button within my old application. would be very glad for any conversations.

21 Jun
3 months ago

hackroot left a reply on Hiding A Section Of A Table When Empty In Laravel

I also wish to thank all of you @cronix & @jlrdw, I appreciate the help thanks a ton

hackroot left a reply on Hiding A Section Of A Table When Empty In Laravel

@DEANSATCH - Thanks a lot @deansatch your answer worked great.

hackroot left a reply on Hiding A Section Of A Table When Empty In Laravel

@CRONIX - Ok so it's not gonna be possible then? Please I am very new to PHP and LARAVEL

19 Jun
3 months ago

hackroot left a reply on Hiding A Section Of A Table When Empty In Laravel

The invoice result is like below;

Items Qty Price Total Baby Oil - Each 1 GH¢ 28.00 GH¢ 28.00 Baby Powder - Each 1 GH¢ 70.00 GH¢ 70.00 Sub Total GH¢ 98.00 Discount GH¢ 0.00 Tax GH¢ 0.00 Total GH¢ 98.00 Cash Round GH¢ 0.00 Balance GH¢ 98.00 Tendered GH¢ 100.00 (editable) Change GH¢ 2

The invoice looks like the above. Don't know if I can share an image here. What i am trying to do is to hide the discount, tax and cash round when they are GHS 0.00.

hackroot left a reply on Hiding A Section Of A Table When Empty In Laravel

Hi, @cronix, first I want to thank you for answering my question however I have tried using your methods above but the table sections still show. Although your code hasn't shown me any errors yet it didn't solve the problem. Please check from the code below if I am doing something wrong, please

The Code;

        <table class="" style="width: 290px;">
            <thead>
            <tr>
                <th>@lang('form.items')</th>
                <th class="text-center">@lang('form.qty')</th>
                <th class="text-center">@lang('form.price')</th>
                <th class="text-right">@lang('form.total')</th>
            </tr>
            </thead>
            <tbody>

            @foreach($invoice->sold_items as $lineRow)

            <tr>
                <td class="first-column"><?php echo $lineRow->item->item_name ." - ". $lineRow->unit->unit_name ; ?> </td>
                <td class="text-center"><?php echo $lineRow['quantity']; ?></td>
                <td class="text-right"><?php echo format_currency($lineRow['unit_price']); ?></td>
                <td class="text-right"><?php echo format_currency($lineRow['sub_total']); ?></td>
            </tr>

            <tr>
                <td colspan="4"></td>
            </tr>
            @endforeach

            </tbody>

            <tfoot>
                @if ($invoice->gross_total)
            <tr>
                <td colspan="3" class="text-right">@lang('form.gross_total')</td>
                <td class="text-right">{{ format_currency( $invoice->gross_total) }}</td>
            </tr>
                @endif
                
                @if ($invoice->discount_total)
            <tr>
                <td colspan="3" class="text-right" >@lang('form.discount')</td>
                <td class="text-right">{{ format_currency( $invoice->discount_total) }}</td>
            </tr>
                @endif
                
                @if ($invoice->tax_total)
            <tr>
                <td colspan="3" class="text-right">@lang('form.tax')</td>
                <td class="text-right">{{ format_currency( $invoice->tax_total) }}</td>
            </tr>
                @endif
                 
                @if ($invoice->net_total)
            <tr>
                <td colspan="3" class="text-right">@lang('form.total')</td>
                <td class="text-right">{{ format_currency( $invoice->net_total ) }}</td>
            </tr>
                @endif
                
                @if ($invoice->cash_rounded_amount)
            <tr>
                <td colspan="3" class="text-right">@lang('form.cash_round')</td>
                <td class="text-right">{{ format_currency( $invoice->cash_rounded_amount ) }}</td>
            </tr>
                @endif
                
                @if ($invoice->balance)
            <tr>
                <td colspan="3" class="text-right">@lang('form.balance')</td>
                <td class="text-right">{{ format_currency( $invoice->balance ) }}</td>
            </tr>
                @endif
            <tr>
                <td colspan="3" class="text-right">@lang('form.tendered')</td>
                <td class="text-right">{{ format_currency( $invoice->amount_received ) }}</td>
            </tr>
                
            <tr>
                <td colspan="3" class="text-right">@lang('form.change')</td>
                <td class="text-right">{{ format_currency( $invoice->amount_received - $invoice->balance ) }}</td>
            </tr>


            </tfoot>
        </table>

        <br>
        <div class="text-center thank-you-text">Thank you for your purchase!</div>
    </div>

All the sections that are suppose to be hidden still show when I am trying to print.

hackroot started a new conversation Hiding A Section Of A Table When Empty In Laravel

Hi, I am working on a pos system with laravel, currently i am trying to hide empty options on th pos receipt whe they are empty. Example I have a section for Tax, Discounts, Change, and several others however my client may not make use of Tax during sales. Is there any possible way i can make 'Tax' visible only when a value has been entered but invisible even on printed receipt when null?

My Code is Below;

@lang('form.items') @lang('form.qty') @lang('form.price') @lang('form.total')
            @foreach($invoice->sold_items as $lineRow)

            <tr>
                <td class="first-column"><?php echo $lineRow->item->item_name ." - ". $lineRow->unit->unit_name ; ?> </td>
                <td class="text-center"><?php echo $lineRow['quantity']; ?></td>
                <td class="text-right"><?php echo format_currency($lineRow['unit_price']); ?></td>
                <td class="text-right"><?php echo format_currency($lineRow['sub_total']); ?></td>
            </tr>

            <tr>
                <td colspan="4"></td>
            </tr>
            @endforeach

            </tbody>

            <tfoot>
            <tr>
                <td colspan="3" class="text-right">@lang('form.gross_total')</td>
                <td class="text-right"><?php echo format_currency( $invoice->gross_total); ?></td>
            </tr>
            <tr>
                <td colspan="3" class="text-right" >@lang('form.discount')</td>
                <td class="text-right"><?php echo format_currency( $invoice->discount_total); ?></td>
            </tr>
            <tr>
                <td colspan="3" class="text-right">@lang('form.tax')</td>
                <td class="text-right"><?php echo format_currency( $invoice->tax_total); ?></td>
            </tr>


            <tr>
                <td colspan="3" class="text-right">@lang('form.total')</td>
                <td class="text-right"><?php echo format_currency( $invoice->net_total ); ?></td>
            </tr>
            <tr>
                <td colspan="3" class="text-right">@lang('form.cash_round')</td>
                <td class="text-right"><?php echo format_currency( $invoice->cash_rounded_amount ); ?></td>
            </tr>
            <tr>
                <td colspan="3" class="text-right">@lang('form.balance')</td>
                <td class="text-right"><?php echo format_currency( $invoice->balance ); ?></td>
            </tr>

            <tr>
                <td colspan="3" class="text-right">@lang('form.tendered')</td>
                <td class="text-right"><?php echo format_currency( $invoice->amount_received ); ?></td>
            </tr>

            <tr>
                <td colspan="3" class="text-right">@lang('form.change')</td>
                <td class="text-right"><?php echo format_currency( $invoice->amount_received - $invoice->balance ); ?></td>
            </tr>


            </tfoot>
        </table>

Please check and help me thanks