pol_php

pol_php

Member Since 2 Months Ago

Experience Points 290
Experience Level 1

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

15 Jul
2 months ago

pol_php left a reply on Unable To Find Socket Transport Starttls

Have You found any solution to resolve your problem with sending mails? I have this same problem.

10 Jul
2 months ago

pol_php started a new conversation Problem With Validate Checkboxes And Inputs

In my form I have three checkboxes and the inputs attached to them. From all checks only one can be checked and if it is input next to him have some valid rule. Im not shure do I do it correctly beacause when not one checkbox is checked he validate inputs and returns errors.

    <div class="form-group col-md-4">
        <div class="input-group">
        <div class="input-group-prepend">
            <div class="input-group-text">
                <input type="checkbox" name="method" id="method1" value="1">
            </div>
            <span class="input-group-text">456ghj</span>
        </div>
        <input type="text" class="form-control" >
    </div>
{!! $errors->first('method1', '<strong><p style="color:red;" class="help-block">:message</p></strong>') !!}
    </div>
    <div class="form-group col-md-4">
        <div class="input-group">
        <div class="input-group-prepend">
            <div class="input-group-text">
                <input type="checkbox" name="method" id="method2" value="2">
            </div>
        </div>
        <input type="text" class="form-control" name="sposob2">
    </div>
{!! $errors->first('method2', '<strong><p style="color:red;" class="help-block">:message</p></strong>') !!}
    </div>

and my rule

 $request->validate([
            'data' => ['required', 'date', 'date_format:Y-m-d'],
            'method' => ['required', 'min:1'],
            'method1' => ['required_if:method, ==,1', 'regex:/^[0-9]{2}/'],
            'method2' => ['required_if:method, ==,2', 'regex:/^[0-9]{1}\/[0-9]{4}\/[0-9]{3}/'],
           
        ]);

pol_php left a reply on Problem With Creating Folder On Debian Os

Ok now it works. Thank you very much for yours time @slev-ua and @markus.heb. I would give you both best answer but im not shure can I do that however, I am still very grateful for yours help

08 Jul
2 months ago

pol_php left a reply on Problem With Creating Folder On Debian Os

Shure. I believe that this fragment should suffice

if($request->hasFile('doc_scan'))
        {
            $file = $request->file('doc_scan');
            $fName= $file->getClientOriginalName();

            $path = Scans::setPath($year[0],$year[1],'doc');

            if(!file_exists($path))
            {
                //mkdir($path, 0777, true);
                File::makeDirectory(public_path('storage/').$path, 0777, true);
            }

            $check = $path.$fName;

          if(Storage::exists($check) || Scans::existSkan($check))
          {
              return back()->with('error','file exist!');
          }
          else
          {
              if ($file->storeAs($path, $fName))
              {
                  $scan = new Scans();
                  $scan->path = $path . $fName;
                  $scan->doc_id= $paper->doc_id;
                  $scan->save();
              }
          }
        }

I check he should add data to db if it upload file on server but it not upload and still insert data to db.

pol_php left a reply on Problem With Creating Folder On Debian Os

Ok now creating path correct but not upload with method storeAs. No errors. Can it be somehow related?

pol_php left a reply on Problem With Creating Folder On Debian Os

Funny thing. Every were (storage and storage/doc) is drwvrwxrwx | www-data | www-data | 4096 jun 4 10:24. For now I'm trying create folder like this

mkdir($myPath, 0777, true);

So I changed to

File::makeDirectory($myPath), 0777, true;

Right now it create folder not in public/storage but in /public. If someone corrects me, I just change the wayto create a folder and it will maybe help ?

pol_php left a reply on Problem With Creating Folder On Debian Os

Thank you all for replay. I had check and right now privilages looks like this

  1. when I'm in var/www and make ls -la I get

drwxr-xr-x | www-data | www-data | 4096 jun 4 10:24 myProject

  1. when I'm in var/www/myProject and make ls -la I get

drwvrwxrwx | www-data | www-data | 4096 jun 4 10:24 public

So when it comes to privileges, is it enough ?

My exception message is

ErrorException (E_WARNING) mkdir(): Permission denied

pol_php started a new conversation Problem With Creating Folder On Debian Os

Hello I have next problem after I import my laravel app from WIN 10 to Debian 8.3. In my app when some create ofert in db he can upload scan file to server. Path to store folder is 'myProcject/public/storage/doc/$year/$month', simple. After I install app on debian evrything is work until someone wants to upload file to server. I got error mkdir(): Permission denied. I have tried change privilages to all folder to 777 and etc. but nothing work still got this error. Has anyone already encountered such a problem?

04 Jul
2 months ago

pol_php left a reply on Problem With Running The Application From The Server With Debian 8.3

Thank's again for replay. Now already work's fine

pol_php left a reply on Problem With Running The Application From The Server With Debian 8.3

Hi and thanks for replay. It's funny thing. I do that what you write and it's showing "5.6.38-0+deb8u1". But when I'm checking php version in terminal it's showing 7.3.6. I belive that's my problem. Ok and now it's working!

pol_php started a new conversation Problem With Running The Application From The Server With Debian 8.3

Hello I have the following problem. I created app in laravel on my computer with Win 10, PRO, 64-bit, PHP Version 7.3.2 and it works super. But when I copy app on server with Debian 8.3, PHP version 7.3.6 it's not working. When I try I have white page nothing else. I check app logs in apache2 and I have this error: "PHP Parse error: syntax error, unexpected '?' in /var/www/shopapp/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php on line 500". What i can do more to run this app?