Our Black Friday sale is now live! All individual subscriptions are 50% OFF. This week only!

Fajar

Fajar

Member Since 2 Years Ago

Bekasi

Experience Points
4,750
Total
Experience

250 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
1
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 1
4,750 XP
Aug
25
3 months ago
Activity icon

Started a new Conversation Create A Symlink To The Target File Or Directory

Hay I want to ask I'm trying to make an ui package in laravel 7 and i get an error message when i try to run this command

php artisan ui coffee

I got this message

copy(/Users/fajardev/Sites/CoffePackage/packages/coffee-frontend-presets/coffee-ui-dashboard/src/coffee-ui-stubs/coffee-ui-stubs/resources/views/welcome.blade.php): failed to open stream: No such file or directory

  at vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:252
    248|      * @return bool
    249|      */
    250|     public function copy($path, $target)
    251|     {
  > 252|         return copy($path, $target);
    253|     }
    254| 
    255|     /**
    256|      * Create a symlink to the target file or directory. On Windows, a hard link is created if the target is a file.

      +1 vendor frames 
  2   packages/coffee-frontend-presets/coffee-ui-dashboard/src/coffee-ui-stubs/CoffeeUiPreset.php:72
      Illuminate\Filesystem\Filesystem::copy("/Users/fajardev/Sites/CoffePackage/packages/coffee-frontend-presets/coffee-ui-dashboard/src/coffee-ui-stubs/coffee-ui-stubs/resources/views/welcome.blade.php", "/Users/fajardev/Sites/CoffePackage/resources/views/welcome.blade.php")

  3   packages/coffee-frontend-presets/coffee-ui-dashboard/src/coffee-ui-stubs/CoffeeUiPreset.php:48
      FajarDev\CoffeeUiPreset\CoffeeUiPreset::copyFile("resources/views/welcome.blade.php", "/Users/fajardev/Sites/CoffePackage/resources/views/welcome.blade.php")

this is his configuration

composer.json in laravel projek

"autoload-dev": {
        "psr-4": {
            "Tests\": "tests/",
            "FajarDev\CoffeeUiPreset\": "packages/coffee-frontend-presets/coffee-ui-dashboard/src"
        }
    },

app.php

FajarDev\CoffeeUiPreset\CoffeeUiPresetServiceProvider::class,

composer.json in folder packages/coffee-frontend-presets/coffee-ui-dashboard/src/coffee-ui-stubs

"autoload": {
        "psr-4": {
            "FajarArtBekasi\CoffeeUiPreset\": "src/"
        }
    },
    "extra": {
        "laravel": {
            "providers": [
                "FajarArtBekasi\CoffeeUiPreset\CoffeeUiPresetServiceProvider"
            ]
        }
    }

CoffeeUiPreset.php

<?php

namespace FajarDev\CoffeeUiPreset;

use Illuminate\Filesystem\Filesystem;
use Laravel\Ui\Presets\Preset;

class CoffeeUiPreset extends Preset
{
    const STUBSPATH = __DIR__.'/coffee-ui-stubs/';

     /**
     * Install the preset.
     *
     * @return void
     */
    public static function install()
    {
        static::updatePackages();


        static::updateWelcomePage();
    }

    /**
     * Update the given package array.
     *
     * @param  array  $packages
     * @return array
     */
    protected static function updatePackageArray(array $packages)
    {
        return $packages;
    }


    /**
     * Update the default welcome page file.
     *
     * @return void
     */
    protected static function updateWelcomePage()
    {
        // remove default welcome page
        static::deleteResource(('views/welcome.blade.php'));

        // copy new one from your stubs folder
        static::copyFile('resources/views/welcome.blade.php', resource_path('views/welcome.blade.php'));
    }


    /**
     * Delete a resource
     *
     * @param string $resource
     * @return void
     */
    private static function deleteResource($resource)
    {
        (new Filesystem)->delete(resource_path($resource));
    }

    /**
     * Copy a directory
     *
     * @param string $file
     * @param string $destination
     * @return void
     */
    private static function copyFile($file, $destination)
    {
        (new Filesystem)->copy(static::STUBSPATH.$file, $destination);
    }

    /**
     * Copy a directory
     *
     * @param string $directory
     * @param string $destination
     * @return void
     */
    private static function copyDirectory($directory, $destination)
    {
        (new Filesystem)->copyDirectory(static::STUBSPATH.$directory, $destination);
    }
}

error leads to

 * @return bool
    249|      */
    250|     public function copy($path, $target)
    251|     {
  > 252|         return copy($path, $target);
    253|     }
    254| 
    255|     /**
    256|      * Create a symlink to the target file or directory. On Windows, a hard link is created if the target is a file.

thx

Jul
24
4 months ago
Activity icon

Replied to Npm Run Dev Problem In Fresh Laravel Project

@modelbase Thx for you comment and solved for me

upgrade node js to 14.6.0 with brew

  1. brew update
  2. brew upgrade node

and work

Jul
22
4 months ago
Activity icon

Replied to Npm Run Dev Problem In Fresh Laravel Project

@chr15k I use the version 6.13.4 node version v13.5.0

I use valet valet

Jul
21
4 months ago
Activity icon

Replied to Npm Run Dev Problem In Fresh Laravel Project

@ideepesh what's the difference between run dev and run development

has it been run dev = run development?

Activity icon

Replied to Npm Run Dev Problem In Fresh Laravel Project

Yups after i finish installing laravel i do npm install and then I run npm run dev

but I got the problem

Activity icon

Started a new Conversation Npm Run Dev Problem In Fresh Laravel Project

Hi do you guys experience the same thing when installing laravel, and having installed npm then running npm run dev gets an error like this

@ dev /Users/fajardev/Sites/inventory
> npm run development


> @ development /Users/fajardev/Sites/inventory
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

/Users/fajardev/Sites/inventory/node_modules/webpack-cli/bin/cli.js:93
				throw err;
				^

Error: No valid exports main found for '/Users/fajardev/Sites/inventory/node_modules/colorette'
    at resolveExportsTarget (internal/modules/cjs/loader.js:622:9)
    at applyExports (internal/modules/cjs/loader.js:499:14)
    at resolveExports (internal/modules/cjs/loader.js:548:12)
    at Function.Module._findPath (internal/modules/cjs/loader.js:654:22)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:953:27)
    at Function.Module._load (internal/modules/cjs/loader.js:859:27)
    at Module.require (internal/modules/cjs/loader.js:1028:19)
    at require (/Users/fajardev/Sites/inventory/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at Object.<anonymous> (/Users/fajardev/Sites/inventory/node_modules/autoprefixer/lib/autoprefixer.js:5:17)
    at Module._compile (/Users/fajardev/Sites/inventory/node_modules/v8-compile-cache/v8-compile-cache.js:194:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1159:10)
    at Module.load (internal/modules/cjs/loader.js:988:32)
    at Function.Module._load (internal/modules/cjs/loader.js:896:14)
    at Module.require (internal/modules/cjs/loader.js:1028:19)
    at require (/Users/fajardev/Sites/inventory/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at /Users/fajardev/Sites/inventory/node_modules/laravel-mix/src/components/Preprocessor.js:62:41
    at /Users/fajardev/Sites/inventory/node_modules/laravel-mix/src/components/Preprocessor.js:69:31
    at global.tap (/Users/fajardev/Sites/inventory/node_modules/laravel-mix/src/helpers.js:10:5)
    at /Users/fajardev/Sites/inventory/node_modules/laravel-mix/src/components/Preprocessor.js:27:13
    at Array.forEach (<anonymous>)
    at Sass.webpackRules (/Users/fajardev/Sites/inventory/node_modules/laravel-mix/src/components/Preprocessor.js:22:22)
    at ComponentFactory.applyRules (/Users/fajardev/Sites/inventory/node_modules/laravel-mix/src/components/ComponentFactory.js:155:23)
    at /Users/fajardev/Sites/inventory/node_modules/laravel-mix/src/components/ComponentFactory.js:66:48
    at /Users/fajardev/Sites/inventory/node_modules/laravel-mix/src/Dispatcher.js:34:47
    at Array.forEach (<anonymous>)
    at Dispatcher.fire (/Users/fajardev/Sites/inventory/node_modules/laravel-mix/src/Dispatcher.js:34:28)
    at Mix.dispatch (/Users/fajardev/Sites/inventory/node_modules/laravel-mix/src/Mix.js:118:25)
    at WebpackConfig.buildRules (/Users/fajardev/Sites/inventory/node_modules/laravel-mix/src/builder/WebpackConfig.js:90:13)
    at WebpackConfig.build (/Users/fajardev/Sites/inventory/node_modules/laravel-mix/src/builder/WebpackConfig.js:23:14)
    at Object.<anonymous> (/Users/fajardev/Sites/inventory/node_modules/laravel-mix/setup/webpack.config.js:29:38)
    at Module._compile (/Users/fajardev/Sites/inventory/node_modules/v8-compile-cache/v8-compile-cache.js:194:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1159:10)
    at Module.load (internal/modules/cjs/loader.js:988:32)
    at Function.Module._load (internal/modules/cjs/loader.js:896:14)
    at Module.require (internal/modules/cjs/loader.js:1028:19)
    at require (/Users/fajardev/Sites/inventory/node_modules/v8-compile-cache/v8-compile-cache.js:161:20) {
  code: 'MODULE_NOT_FOUND'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @ development script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/fajardev/.npm/_logs/2020-07-21T16_03_39_526Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ dev: `npm run development`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @ dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/fajardev/.npm/_logs/2020-07-21T16_03_39_566Z-debug.log

when i looked on github, haven't found a solution https://github.com/JeffreyWay/laravel-mix/issues/523

thx for you comment

Jun
16
5 months ago
Activity icon

Replied to Packages Depeden

@bobbybouwmann means in other words I have to release 2 versions ... for the older and most recent versions

Activity icon

Replied to Packages Depeden

@bobbybouwmann then what is your suggestion do I have to keep making it only support laravel 7

or keep writing for all versions as you demonstrated above

Jun
15
5 months ago
Activity icon

Replied to Packages Depeden

@bobbybouwmann when I upgraded to support laravel 7. *

I found an error that is

Presetcommand not found

whereas in laravel 7. * has been replaced with

uicommand
Activity icon

Started a new Conversation Packages Depeden

Hello guys

how to make a packagase work for versions with versions 5.5 to 7.x

"require": {
        "laravel/framework": "^5.6 || ^6.0 || ^7.0 "
    },

do I have to write it like that thx