RCRalph

RCRalph

Member Since 2 Weeks Ago

Experience Points
190
Total
Experience

4,810 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 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 1
190 XP
Aug
03
1 week ago
Activity icon

Started a new Conversation Telescope Receiving Empty Responses Even Though There Are Records In The Database That It Should Show

Telescope doesn't display any records from the telescope_entries table, but instead it only shows this:

If we take a look into the browser console, we will see that Telescope frequently sends POST requests to its API, but receives an empty array of entries:

I am sure that there are records in the database, because I can see them using my database viewer:

Also when I run DB::table("telescope_entries")->get() in Tinker I get the proper records from the database.

For debugging purposes I added lad([$request, $storage]); before the return statement in the index method in EntryController:

public function index(Request $request, EntriesRepository $storage)
{
    lad([$request, $storage]); // function comes from lanin/laravel-api-debugger
    return response()->json([
        'entries' => $storage->get(
            $this->entryType(),
            EntryQueryOptions::fromRequest($request)
        ),
        'status' => $this->status(),
    ]);
}

Now when the browser send the request to Telescope's API, it receives the following JSON:

{
    "entries": [],
    "status": "enabled",
    "debug": {
        "database": {
            "total": 1,
            "items": [
                {
                    "connection": "sqlite",
                    "query": "select * from \"telescope_entries\" where \"type\" = 'request' and \"should_display_on_index\" = '1' order by \"sequence\" desc limit 50;",
                    "time": 7.68
                }
            ]
        },
        "cache": {
            "hit": {
                "keys": [],
                "total": 0
            },
            "miss": {
                "keys": [
                    "telescope:dump-watcher",
                    "telescope:pause-recording"
                ],
                "total": 2
            },
            "write": {
                "keys": [],
                "total": 0
            },
            "forget": {
                "keys": [],
                "total": 0
            }
        },
        "profiling": [
            {
                "event": "request-time",
                "time": 0.6450369358062744
            }
        ],
        "memory": {
            "usage": 16327024,
            "peak": 16547112
        },
        "dump": [
            [
                {
                    "attributes": {},
                    "request": {},
                    "query": {},
                    "server": {},
                    "files": {},
                    "cookies": {},
                    "headers": {}
                },
                {}
            ]
        ]
    }
}

When I run the SQL statement provided above in my database viewer, I receive the records that I should be receiving:

This issue seems to be database independent. I connected to an external PostgreSQL database as well as to a local SQLite database and the same issue occurred.

I'm stuck with this since I first started with Laravel and literally I can't do anything about it. I posted an issue on Telescope's GitHub but it got closed because "It worked for someone else".

Steps I made to recreate this issue:

  • Created a new Laravel project
  • Set the DB_CONNECTION variable in .env file to sqlite
  • Created a new file called database.sqlite in the /database folder
  • Ran commands:
    • composer require laravel/telescope
    • php artisan telescope:install
    • php artisan migrate

Also, I'm not in production nor I did anything more than the above. Telescope also doesn't work for me if I use a project created by someone else, but for that person it works.

Any help is appreciated!

Aug
01
1 week ago
Activity icon

Replied to Laravel Telescope Not Showing Records

Also, if I was in production mode, I wouldn't be able to access Telescope.

Activity icon

Replied to Laravel Telescope Not Showing Records

No, I'm not in production and I didn't install it with the --dev flag. A wider description of what is happening to me is available here: https://github.com/laravel/telescope/issues/927

Jul
31
1 week ago
Activity icon

Started a new Conversation Laravel Telescope Not Showing Records

Hello,

I'm struggling to get Laravel Telescope to work. The table telescope_entries has records in it, but they don't show up in the /telescope directory. I'm working on a completely vanilla project, I only downloaded laravel/ui and laravel/telescope. If you could help me with that, that would be awesome :D

Jul
30
2 weeks ago
Activity icon

Started a new Conversation Trouble Deploying Laravel Application To Cloud Foundry On IBM Cloud

I'm trying to deploy a basic Laravel application to Cloud Foundry on IBM Cloud. Below you can see the output after I ran ibmcloud cf push:

Invoking 'cf push'...

Pushing from manifest to org ***** / space dev as *****...
Using manifest file *****\manifest.yml
Getting app info...
Updating app with these attributes...
  name:                testproject
  path:                *****
  buildpacks:
    https://github.com/cloudfoundry/php-buildpack.git#v4.4.13
  disk quota:          1G
  health check type:   port
  instances:           1
  memory:              64M
  stack:               cflinuxfs3
  env:
    APP_DEBUG
    CF_STAGING_TIMEOUT
    CF_STARTUP_TIMEOUT
  routes:
    testproject.us-south.cf.appdomain.cloud

Updating app testproject...
Mapping routes...
Comparing local files to remote cache...
Packaging files to upload...
Uploading files...
 8.35 MiB / 8.35 MiB [==========================================================] 100.00% 5s

Waiting for API to complete processing files...

Staging app and tracing logs...
   Cell 87626c63-eae1-42ff-a4fb-785ef79934bd creating container for instance cacf5821-7867-496a-8ace-b6ef71835d24
   Cell 87626c63-eae1-42ff-a4fb-785ef79934bd successfully created container for instance cacf5821-7867-496a-8ace-b6ef71835d24
   Downloading build artifacts cache...
   Downloading app package...
   Downloaded build artifacts cache (217B)
   Downloaded app package (12.1M)
   -------> Buildpack version 4.4.13
   Installing HTTPD
   HTTPD 2.4.43
   Downloaded [https://buildpacks.cloudfoundry.org/dependencies/httpd/httpd_2.4.43_linux_x64_cflinuxfs3_59c67ff8.tgz] to [/tmp]
   Installing PHP
   PHP 7.4.5
   Downloaded [https://buildpacks.cloudfoundry.org/dependencies/php/php7_7.4.5_linux_x64_cflinuxfs3_c0055c53.tgz] to [/tmp]
   The extension 'mcrypt' is not provided by this buildpack.
   Downloaded [https://buildpacks.cloudfoundry.org/dependencies/php/php7_7.4.5_linux_x64_cflinuxfs3_c0055c53.tgz] to [/tmp]
   Downloaded [https://buildpacks.cloudfoundry.org/dependencies/composer/composer_1.10.5_linux_noarch_any-stack_a1f79ebd.phar] to [/tmp]
     % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                    Dload  Upload   Total   Spent    Left  Speed
     0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
   100   482  100   482    0     0   2738      0 --:--:-- --:--:-- --:--:--  2754
   Loading composer repositories with package information
   Installing dependencies from lock file
   Package operations: 0 installs, 0 updates, 37 removals
     - Removing webmozart/assert (1.9.1)
     - Removing theseer/tokenizer (1.2.0)
     - Removing sebastian/version (2.0.1)
     - Removing sebastian/type (1.1.3)
     - Removing sebastian/resource-operations (2.0.1)
     - Removing sebastian/recursion-context (3.0.0)
     - Removing sebastian/object-reflector (1.1.1)
     - Removing sebastian/object-enumerator (3.0.3)
     - Removing sebastian/global-state (3.0.0)
     - Removing sebastian/exporter (3.1.2)
     - Removing sebastian/environment (4.2.3)
     - Removing sebastian/diff (3.0.2)
     - Removing sebastian/comparator (3.0.2)
     - Removing sebastian/code-unit-reverse-lookup (1.0.1)
     - Removing scrivo/highlight.php (v9.18.1.1)
     - Removing phpunit/phpunit (8.5.8)
     - Removing phpunit/php-token-stream (3.1.1)
     - Removing phpunit/php-timer (2.1.2)
     - Removing phpunit/php-text-template (1.2.1)
     - Removing phpunit/php-file-iterator (2.0.2)
     - Removing phpunit/php-code-coverage (7.0.10)
     - Removing phpspec/prophecy (1.11.1)
     - Removing phpdocumentor/type-resolver (1.3.0)
     - Removing phpdocumentor/reflection-docblock (5.2.0)
     - Removing phpdocumentor/reflection-common (2.2.0)
     - Removing phar-io/version (2.0.1)
     - Removing phar-io/manifest (1.0.3)
     - Removing nunomaduro/collision (v4.2.0)
     - Removing myclabs/deep-copy (1.10.1)
     - Removing mockery/mockery (1.4.1)
     - Removing hamcrest/hamcrest-php (v2.0.1)
     - Removing fzaninotto/faker (v1.9.1)
     - Removing filp/whoops (2.7.3)
     - Removing facade/ignition-contracts (1.0.1)
     - Removing facade/ignition (2.3.4)
     - Removing facade/flare-client-php (1.3.4)
     - Removing doctrine/instantiator (1.3.1)
   Generating optimized autoload files

     [RuntimeException]
     Could not scan for classes inside "database/seeds" which does not appear to be a file nor a folder

   install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]...
   -----> Composer command failed
   Traceback (most recent call last):
     File "/tmp/buildpackdownloads/a299fb3027da6b25566e06badf712812/scripts/compile.py", line 59, in <module>
       .from_build_pack('lib/additional_commands')
     File "/tmp/buildpackdownloads/a299fb3027da6b25566e06badf712812/lib/build_pack_utils/builder.py", line 212, in extensions
       process_extension(path, ctx, 'compile', process, args=[self])
     File "/tmp/buildpackdownloads/a299fb3027da6b25566e06badf712812/lib/build_pack_utils/utils.py", line 69, in process_extension
       success(getattr(extn, to_call)(*args))
     File "/tmp/buildpackdownloads/a299fb3027da6b25566e06badf712812/extensions/composer/extension.py", line 444, in compile
       return composer.compile(install)
     File "/tmp/buildpackdownloads/a299fb3027da6b25566e06badf712812/lib/extension_helpers.py", line 154, in compile
       self._compile(install)
     File "/tmp/buildpackdownloads/a299fb3027da6b25566e06badf712812/extensions/composer/extension.py", line 196, in _compile
       self.run()
     File "/tmp/buildpackdownloads/a299fb3027da6b25566e06badf712812/extensions/composer/extension.py", line 343, in run
       *self._ctx['COMPOSER_INSTALL_OPTIONS'])
     File "/tmp/buildpackdownloads/a299fb3027da6b25566e06badf712812/extensions/composer/extension.py", line 390, in run
       shell=True)
     File "/tmp/buildpackdownloads/a299fb3027da6b25566e06badf712812/lib/build_pack_utils/runner.py", line 109, in stream_output
       raise CalledProcessError(retcode, cmd)
   build_pack_utils.runner.CalledProcessError: Command '<open file '<fdopen>', mode 'w' at 0x7f60ea7ac930>' returned non-zero exit status 1
   Failed to compile droplet: Failed to run finalize script: exit status 1
   Exit status 223
   Cell 87626c63-eae1-42ff-a4fb-785ef79934bd stopping instance cacf5821-7867-496a-8ace-b6ef71835d24
   Cell 87626c63-eae1-42ff-a4fb-785ef79934bd destroying container for instance cacf5821-7867-496a-8ace-b6ef71835d24
Error staging application: App staging failed in the buildpack compile phase
FAILED

Here is my composer.json file:

{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "require": {
        "php": "^7.2.5",
        "fideloper/proxy": "^4.2",
        "fruitcake/laravel-cors": "^2.0",
        "guzzlehttp/guzzle": "^6.3",
        "laravel/framework": "^7.22.2",
        "laravel/tinker": "^2.0"
    },
    "require-dev": {
        "facade/ignition": "^2.0",
        "fzaninotto/faker": "^1.9.1",
        "mockery/mockery": "^1.3.1",
        "nunomaduro/collision": "^4.1",
        "phpunit/phpunit": "^8.5"
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "autoload": {
        "psr-4": {
            "App\": "app/"
        },
        "classmap": [
            "database/seeds",
            "database/factories"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\": "tests/"
        }
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "scripts": {
        "post-autoload-dump": [
            "Illuminate\Foundation\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi"
        ],
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ]
    }
}

Here is my .pb-config/options.json file:

{
    "PHP_VERSION": "{PHP_70_LATEST}",
    "COMPOSER_VENDOR_DIR": "vendor",
    "WEBDIR": "public"
}

Here is my manifest.yml file:

---
 applications:
 - name: testproject
   memory: 64M
   buildpacks: [ https://github.com/cloudfoundry/php-buildpack.git#v4.4.13 ]
   random-route: true
   env:
     APP_DEBUG: false
     CF_STAGING_TIMEOUT: 15
     CF_STARTUP_TIMEOUT: 15

I want to point out that the directory database/seeds exists and it contains file DatabaseSeeder.php.

This is my first time with Cloud Foundry and IBM Cloud. Any help is greatly appreciated!