giacholari

giacholari

at Birmingham UK

Member Since 4 Years Ago

Experience Points
116,880
Total
Experience

3,120 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
1106
Lessons
Completed
Best Reply Awards
1
Best Reply
Awards
  • start your 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-in-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 Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist 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 24
116,880 XP
Sep
14
6 days ago
Activity icon

Replied to Box 'laravel/homestead' Could Not Be Found.

Consider installing homestead on a per project basis. You can pull it in by running composer require laravel/homestead --dev

Search in docs per project installation https://laravel.com/docs/8.x/homestead

Sep
13
1 week ago
Activity icon

Replied to No Application Key - Github Action For Laravel

@bobbybouwmann I will try your suggestion and let you know

Activity icon

Replied to No Application Key - Github Action For Laravel

Thanks for the reply @bobbybouwmann

Yes I have the .env.testing file. The only thing that works for now is to manually set the app key and commit that. However, I do not think that is the way to go. Ideally the key should be generated when the job is triggered in the action

Activity icon

Started a new Conversation No Application Key - Github Action For Laravel

I have setup the default laravel github actions for my project but I get an error that the application key is not set. Any idea?

GITHUB WORKFLOW

name: Build

on:
  push:
    branches: [ master, develop ]
  pull_request:
    branches: [ master, develop ]

jobs:
  build:

    runs-on: ubuntu-latest
    
    steps:
    - uses: actions/[email protected]
    - name: Copy .env
      run: php -r "file_exists('.env') || copy('.env.testing', '.env');"
    - name: Install Dependencies
      run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
    - name: Generate key
      run: php artisan key:generate
    - name: Directory Permissions
      run: chmod -R 777 storage bootstrap/cache
    - name: Create Database
      run: |
        mkdir -p database
        touch database/database.sqlite
        php artisan migrate
    - name: Execute tests (Unit and Feature tests) via PHPUnit
      env:
        DB_CONNECTION: sqlite
        DB_DATABASE: database/database.sqlite
      run: vendor/bin/phpunit


.ENV.TESTING

APP_ENV=testing
APP_KEY=

DB_CONNECTION=sqlite

CACHE_DRIVER=array
SESSION_DRIVER=array
QUEUE_DRIVER=sync

MAIL_DRIVER=log

[email protected]


PHPUNIT.XML

<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
         backupStaticAttributes="false"
         bootstrap="vendor/autoload.php"
         colors="true"
         convertErrorsToExceptions="true"
         convertNoticesToExceptions="true"
         convertWarningsToExceptions="true"
         processIsolation="false"
         stopOnFailure="false">
    <testsuites>
        <testsuite name="Feature">
            <directory suffix="Test.php">./tests/Feature</directory>
        </testsuite>

        <testsuite name="Unit">
            <directory suffix="Test.php">./tests/Unit</directory>
        </testsuite>
    </testsuites>
    <filter>
        <whitelist processUncoveredFilesFromWhitelist="true">
            <directory suffix=".php">./app</directory>
        </whitelist>
    </filter>
    <php>
        <env name="APP_ENV" value="testing"/>
        <env name="DB_CONNECTION" value="sqlite"/>
        <env name="DB_DATABASE" value=":memory:"/>
        <env name="CACHE_DRIVER" value="array"/>
        <env name="SESSION_DRIVER" value="array"/>
        <env name="QUEUE_DRIVER" value="sync"/>
    </php>
</phpunit>
Activity icon

Started a new Conversation Homestead Php Version

How does Homestead determine which Php version to install or set as active when installing it per project basis?

Aug
17
1 month ago
Activity icon

Replied to Set Html File Input From A Base64 Encoded File

Solution:

Decode base64 string Create a file somewhere in your system Insert the decoded base64 string in the file Save and close the file Reference the file in the front-end Remove the file later when the user is done so you don't end up with multiple temporary files

Aug
16
1 month ago
Activity icon

Replied to Set Html File Input From A Base64 Encoded File

@sinnbeck Thanks for the reply. Well, what I want to achieve eventually when a user is updating the resource is set the file input value to whatever the user has already uploaded.

And what I have in the database is a base64 encoded version of the uploaded file.

So in short yes, I think I need to convert the base64 value to a file in runtime ...

Activity icon

Started a new Conversation Set Html File Input From A Base64 Encoded File

Hi,

I am storing a file in the database as a base64 encoded string. When I am updating the form I need to display the existing file on the form as the selected one. Is there a way to get around using a base64 encoded string?

Aug
14
1 month ago
Activity icon

Replied to Connect To Heroku Database Through MySQL Workbench

@martinbean Thanks for the reply - That is true however this is not possible with Mysql workbench for anyone that attempts to

Aug
13
1 month ago
Activity icon

Awarded Best Reply on Connect To Heroku Database Through MySQL Workbench

Thanks @sinnbeck I just came across this https://stackoverflow.com/questions/3607700/connecting-postgres-database-from-mysql-workbench

Basically it is not possible to connect to Pgsql through Mysql workbench

Activity icon

Replied to Connect To Heroku Database Through MySQL Workbench

Thanks @sinnbeck I just came across this https://stackoverflow.com/questions/3607700/connecting-postgres-database-from-mysql-workbench

Basically it is not possible to connect to Pgsql through Mysql workbench

Activity icon

Started a new Conversation Connect To Heroku Database Through MySQL Workbench

Hi

I am trying to connect to a live database which is hosted to heroku (pgsql). I have attempted to connect through a standar TCP/IP connection with the credentials provided, however I get the following error ...

Failed to connect to mysql at {{ remote ip address}} with username {{ username }} at port {{ port }} Lost connection to Mysql server at waiting for initial communication packet, system error: 10060

Any idea?

Aug
10
1 month ago
Activity icon

Replied to Equivalent To With Relationship In DB Raw SQL Query

@sinnbeck How would that look like? Can you provide an example of the query and the results?

Activity icon

Replied to Equivalent To With Relationship In DB Raw SQL Query

Thanks @sinnbeck So the only way to do so is iterate over all the users and append to a property named roles for this example?

Activity icon

Started a new Conversation Equivalent To With Relationship In DB Raw SQL Query

Hi,

I am trying to perform a raw SQL query in Laravel using the DB class. I have users, roles and a roleUser table. Is there a way to create a join between these tables where I get as a result distinct users with their roles? Thanks

Jun
12
3 months ago
Activity icon

Awarded Best Reply on Designing A Large Project - Specifically Keep Controllers Short

You could potentially, have ManagerY as a dependency within ManagerX (aggregate behavior within one class) and do the stuff on ManagerX, thus only one call to your controller. It is common for service classes to depend on other service classes. You could use ManagerY wherever needed as long as it is passed as a dependency...

Update:

Also I would code to an interface and not reference the concrete classes directly, but a contract of the class wherever injected.

Jun
10
3 months ago
Activity icon

Replied to Designing A Large Project - Specifically Keep Controllers Short

@chris_j You are welcome. Yeah, so if your managers do not mess with state and have functions that produce the same output given the same input, they should work and fit well everywhere you use them within your application. This is the beauty of dependency injection... If you want one class to do more stuff you inject more behavior to it. If you see that one service does a lot of work, then it might be that you need a new service. If a controller has a lot of services, it might be that you need a separate controller ... You see how that works.

Activity icon

Replied to Designing A Large Project - Specifically Keep Controllers Short

You could potentially, have ManagerY as a dependency within ManagerX (aggregate behavior within one class) and do the stuff on ManagerX, thus only one call to your controller. It is common for service classes to depend on other service classes. You could use ManagerY wherever needed as long as it is passed as a dependency...

Update:

Also I would code to an interface and not reference the concrete classes directly, but a contract of the class wherever injected.

May
27
3 months ago
Activity icon

Replied to Laravel Mix Versioning

Thank you for responding. So the actual files will not be hashed but only the manifest file will change?

Activity icon

Started a new Conversation Laravel Mix Versioning

Hi guys,

Just a simple question. Is Laravel mix.version() suppose to add a hash in the files in the public directory?

Thanks.

Activity icon

Started a new Conversation Laravel Mix Version() Issue

Hi,

I am using windows 10, larval-mix v^5.0, and node v12.16.1. When I run .verson() - and npm run prod, in the webpack.mix.js file, the mix-manifest.json files updates with the hashed versions of the files but the actual files in the public directory have no hash or whatsoever?

The mix file below...

let mix = require('laravel-mix');

mix.js('resources/assets/js/app.js', 'public/js') .js('resources/assets/js/coffee/updateAmount.js', 'public/js/coffee') .js('resources/assets/js/photos/refreshPhoto.js', 'public/js/photos') .js('resources/assets/js/photos/fetchPhotos.js', 'public/js/photos') .js('resources/assets/js/forms/delete.js', 'public/js/forms') .js('resources/assets/js/privacy-policy/fetchContent.js', 'public/js/privacy-policy') .sass('resources/assets/sass/app.scss', 'public/css') .version();

Any ideas?

Update: Is it supposed to hash the files in the public directory?

May
06
4 months ago
Activity icon

Started a new Conversation Return Response File - File Is In External Location

Hi everyone. I have set up a Github pages repo with static files. I use these files to my main Laravel app. This is an example of a file https://romariogiacholari.github.io/static/pdf/resume.pdf. In the controller I do

$file = 'https://romariogiacholari.github.io/static/pdf/resume.pdf';
return response()->file($file); 

I get an error that the file does not exist ... Any ideas?