bigblueboss

bigblueboss

Member Since 5 Years Ago

Experience Points
16,360
Total
Experience

3,640 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
176
Lessons
Completed
Best Reply Awards
1
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 4
16,360 XP
Dec
29
1 month ago
Activity icon

Replied to Storage Download Seems To Be Corrupted

@mushood would storage/app be publicly accessible to anyone? I needed my files to be not accessible to everyone.

Dec
28
1 month ago
Activity icon

Replied to Storage Download Seems To Be Corrupted

@mushood so I took out storeAs, and I put in:

  Storage::disk('local')->put($sanitized, $request->fileName);

The part that I don't understand at the moment is that (let's say the filename is annual.pdf). Then instead of uploading to /uploads/annual.pdf, it is uploading to /uploads/annual.pdf/original_file_name.pdf (where annual.pdf is a folder).

Does anyone know why this is the case?

=======Edit=======

It turns out that what I needed to do for it to create the filename instead of directory/filename was:

  Storage::disk('local')->put($sanitized, file_get_contents($request->fileName));

It seems a bit specific to my own case, so I'll give best answer to your first post @mushood

And btw, I wanted to make all of these file private from the public url access, and that is why I made the uploads folder in the root of the application. Is this an appropriate way to do it?

Activity icon

Replied to Storage Download Seems To Be Corrupted

@mushood I will try the first set of code that you posed as opposed to my storeAs (i'm saving into uploads since I didn't want these files accessible to the public, and everything in the public folder seems to be accessible to the public through url). I will reply with how the code turned out.

Activity icon

Replied to Storage Download Seems To Be Corrupted

@mushood I have updated the original question to add in the code process. Thanks a bunch!

Activity icon

Started a new Conversation Storage Download Seems To Be Corrupted

Followed guides. Got all the file stored and that seem to be working. But when I try to download and open the file, it seems it is corrupted and cannot open it.

Is there any reason for this?

public function store(Request $request)
{
  //validate
  $request->validate([
    'fileName' => 'required|file|max:8192|unique:documents'
  ]);

  //string prep
  $fileName = $request->title;
  $extension = "." . request()->fileName->getClientOriginalExtension();
  $stripped = str_replace(' ', '', $fileName);
  $sanitized = $stripped . $extension;

  //store into server
  $request->fileName->storeAs('/', $sanitized);

  Storage::disk('local')->put($sanitized, 'contents');
}

public function download($id)
{
  $document = Document::where('id', $id)->first();

  $docName = $document->slug . $document->extension;
  $dl = Storage::download($docName);

  return $dl;
}

I have (inside config/filesystems.php):

'disks' => [

    'local' => [
        'driver' => 'local',
        'root' => base_path(). '/uploads/',
        'visibility' => 'private',
    ],
Dec
21
2 months ago
Activity icon

Replied to Passing Collection From Laravel To Vue

In my model return if i do "->toJson()"

Would that mean that in my blade I can now just do:

<Lesson questions="{{$questions}}"

Or would this pass a string instead of the actual collection/json ?

Activity icon

Started a new Conversation Passing Collection From Laravel To Vue

I'm passing a laravel collection into a blade. The blade creates something like this:

<Lesson questions="{{$questions}}"

Inside Lesson template i'm doing:

<Question v-for="question in questions" :question="question"

Am i misunderstanding the approach here? ?I thought that v-for would be able to target each of the questions and pass its appropriate values into each Question component, but it seems no data is being passed properly.

Dec
13
2 months ago
Activity icon

Started a new Conversation Subscription "stripe_status" Column

It seems like this is newly added in the recent past. I realize that it is a nullable column that can be marked as active? How can I find out exactly which other values it might be marking? My site stopped working because it expected the column to be there (in the past it didn't have that column and now it has it), so I manually added that column in, but I'm just not sure what "active" turns into when someone cancels. (E.g. "ended" or "inactive"). Also, is there way for me to check all possible option value of anything? Where in the code or documentation would I need to look to find these things for myself?

Sep
05
5 months ago
Activity icon

Replied to Npm Run Watch Issues

Upgraded laravel mix through npm to 4.1.4 and everything started working as usual. @jeffreyway Thanks.

Laravel new ____ is currently bringing in by default: "laravel-mix": "^4.0.7",

Activity icon

Started a new Conversation Npm Run Watch Issues

cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "--watch"

Additional dependencies must be installed. This will only take a moment.

Running: npm install  --save-dev --production=false

Okay, done. The following packages have been installed and saved to your package.json dependencies list:

Additional dependencies must be installed. This will only take a moment.

Running: npm install  --save-dev --production=false

Okay, done. The following packages have been installed and saved to your package.json dependencies list:

Finished. Please run Mix again.

I new up a laravel project. I run npm install. I run npm run dev (or npm run watch), and it keeps saying additional dependencies must be installed, but doesn't install anything.

I tried deleting node_modules folder and reinstalling, that didn't help as well.

Everything was fine yesterday. It just started randomly being a problem today. It is a problem on both laravel 6 and laravel 5.8 by the way.