vandyczech

vandyczech

Member Since 4 Years Ago

Experience Points
11,395
Total
Experience

3,605 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
4
Lessons
Completed
Best Reply Awards
5
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 3
11,395 XP
24 May
3 months ago

vandyczech left a reply on Laravel 5.8 How Right Get The Authentificated User?

@bobbybouwmann

I want create function current for more readable code ... in UserController and use this trough my application. But of course, that Im logged .. but still i see null ...

for example ... Than I can use $this->user->current('id'); And cause I want use this function in UserController and access this in another ..

 private function current( $userInformation ){

        $user = Auth::user();

        switch( $userInformation ){

             // return user id
             case 'id'    : return $user->id;
             break;

             // return username
             case 'name'  : return $user->username;
             break;

             // return useremail
             case 'email' : return $user->email;
             break;

             // return info about operating system and browser of course
             case 'info'  : return $user->info;
             break;

        }

    }

vandyczech started a new conversation Laravel 5.8 How Right Get The Authentificated User?

Documentation says how check authetificated user, but when I use, I get null .. :( Whats wrong .. I need get the auth id across one controller to another controller...

// Get the currently authenticated user...
$user = Auth::user();

// Get the currently authenticated user's ID...
$id = Auth::id();

My code

public function __construct(){

          $this->user  = new UserController();
          $this->user->current('id');
}

and in UserController


 private function current( $userInformation ){

        $user = Auth::user();

        switch( $userInformation ){

             // return user id
             case 'id'    : return $user->id;
             break;

18 May
4 months ago

vandyczech left a reply on Laravel 5.8 Pusher Not Found

Some solution? still not works ...

vandyczech left a reply on Laravel 5.8 Pusher Not Found

@Snapey

Using version ^3.4 for pusher/pusher-php-server
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
  - Installing pusher/pusher-php-server (v3.4.1): Loading from cache
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Discovered Package: beyondcode/laravel-dump-server
Discovered Package: fideloper/proxy
Discovered Package: laravel/tinker
Discovered Package: nesbot/carbon
Discovered Package: nunomaduro/collision
Package manifest generated successfully.

vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastManager.php
Class 'Pusher\Pusher' not found

I use these

namespace Illuminate\Broadcasting;

use Closure;
use Psr\Log\LoggerInterface;
use InvalidArgumentException;
use Illuminate\Broadcasting\Broadcasters\LogBroadcaster;
use Illuminate\Broadcasting\Broadcasters\NullBroadcaster;
use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow;
use Illuminate\Broadcasting\Broadcasters\RedisBroadcaster;
use Illuminate\Broadcasting\Broadcasters\PusherBroadcaster;
use Illuminate\Contracts\Broadcasting\Factory as FactoryContract;
use Pusher\Pusher;
use Pusher\Webhook;

from BroadcastManager.php

protected function createPusherDriver(array $config)
    {
        $pusher = new Pusher(
            $config['key'], $config['secret'],
            $config['app_id'], $config['options'] ?? []
        );
 
        if ($config['log'] ?? false) {
            $pusher->setLogger($this->app->make(LoggerInterface::class));
        }
 
        return new PusherBroadcaster($pusher);
    }

vandyczech left a reply on Laravel 5.8 Pusher Not Found

@snapey Yes, but Pusher still say Class 'Pusher\Pusher' not found

vandyczech left a reply on Laravel 5.8 Pusher Not Found

@Snapey Only help is BROADCAST_DRIVER=log no BROADCAST_DRIVER=pusher but now i test if this is solution is right ... what i set to pusher i see the same eror pusher not found

vandyczech started a new conversation Laravel 5.8 Pusher Not Found

I have problem with run Pusher ... I see error

Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR)
Class 'Pusher\Pusher' not found
…/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastManager.php212

composer.json

 "require": {
         "pusher/pusher-php-server": "^3.0"
    },

in config.app I have uncommented

 'Broadcast' => Illuminate\Support\Facades\Broadcast::class,

and add alias for Pusher

 'Pusher' => \Pusher\Pusher::class,

But still not works ://////////////////

16 May
4 months ago

vandyczech left a reply on Laravel Collection Save() Not Works .... How Do That?

Sorry for all, i find solutions another

vandyczech started a new conversation Laravel Collection Save() Not Works .... How Do That?

$message = Box::find($request->message_id);
$message = collect($message);
$message->put('reactions', serialize($react));

But how the model save? save() not working on collectio ....

12 May
4 months ago

vandyczech left a reply on Add Item To Session Array

@BOBBYBOUWMANN - Works fine, thank you .. but there is no mention in the documentation that I could use [ $id ]

vandyczech left a reply on Add Item To Session Array

@BOBBYBOUWMANN - @bobbybouwmann I read this documentation, but push I use .. but doesnt work ..

My code

$hiddenArr = collect( session()->get('hidden') );
$hiddenArr->push($id);

if( $hiddenArr->contains($id) ){ 
            
 return redirect()->back(); 
        
 } 
        
else  {

session()->push('hidden',$id);
return redirect()->back();

}

vandyczech left a reply on Add Item To Session Array

@bobbybouwmann How I said, i cant add new item to the array ... :// the item value (for this example ID) is overwritten still again ... I need create array hidden, add items to the array but in the session

when i store id 19, add to array('hidden') good
[hidden] => 19

when i store id 20, the value is overwritten .. :/
[hidden] => 20

but i need

[hidden]  => 19
          => 20

vandyczech left a reply on Add Item To Session Array

@TRAY2 - But I have value in the array ..

['hidden'] => 0 => 16 1 => 17

vandyczech started a new conversation Add Item To Session Array

I need store array with id in the session like this

Output for session()->all()['hidden']

1 , 2 , 3 , 4 , 5 ....

How can I add new id to the exist hidden array in session ?

11 May
4 months ago

vandyczech left a reply on Please Share Your Apache Configuration For LARAVEL

@snapey Fresh installation works fine ... but php artisan route:list show me

Your application doesn't have any routes matching the given criteria.

vandyczech left a reply on Please Share Your Apache Configuration For LARAVEL

I have this configuration, public have 777 permission, storage and bootstrap/cache recursively too



<VirtualHost *:82>

    ServerName 192.168.10.45
    ServerAdmin [email protected]
    DocumentRoot "/var/www/local/public"

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    <Directory /var/www/local>

         Options Indexes FollowSymLinks MultiViews
         AllowOverride All
         Require all granted

    </Directory>

</VirtualHost>
10 May
4 months ago

vandyczech started a new conversation Please Share Your Apache Configuration For LARAVEL

When start Laravel on debian / apache .. i see 404 error from Laravel app.. but routes and another not works :{{{{ Please help me with configuration and right set permission to the folder... :(

08 May
4 months ago

vandyczech started a new conversation Laravel 5.8 Validate Float Input

I need validate float for two decimal like this with manually Validator .... how rules I need to use for this result:

I use between:000.00,999.99 but doesnt work

16.52   true
0.57    true
5.8     false
07 May
4 months ago

vandyczech started a new conversation Laravel 5.8 Asset()

Why use asset()? What can I use the right way? Its nessesary vendor publish after use?

public / css / custom.css

vandyczech started a new conversation Laravel 5.8 Permissions

I have this structure, how chmod and chgrp is right .. for laravel, still I see error 500. Please write me the commands for right permission folder ... thank you ... my head is in the air from that ...


/var                            root / www-data         drwxr-xr-x
/var/www                        www-data / www-data     drwxrwxr-x
/var/www/friede                 pi /www-data            drwxr-xr-x
/var/www/friede/app             pi / www-data           drwxr-xr-x
/var/www/friede/app/public      pi / www-data           drwxr-xr-x

My virtual host

<VirtualHost *:80>

    ServerName 192.168.10.45
    ServerAdmin [email protected]
    DocumentRoot /var/www/friede/public

    <Directory "/var/www/friede/public">

    Options FollowSymLinks
    ReWriteEngine On

    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    <Directory "/var/www/friede/public">

    Options FollowSymLinks MultiViews
    ReWriteEngine On

    </Directory>

</VirtualHost>

vandyczech left a reply on Laravel 5.8 Default Apache Virtual Host Configuration

@FORAM - No effect,,, and please share commands for settings folder bootstrap/cache and storgae ...

vandyczech left a reply on Laravel 5.8 Default Apache Virtual Host Configuration

@FORAM - @foram not work ... this is no problem with .env ... with apache2 virtual host is problem .... please share your configuration .....

vandyczech started a new conversation Please Help Me With Apache2 Virtual Host Configuration

My Laravel run on http://84.242.117.60:9000/ Apache server is Apache/2.4.25 (Raspbian) How should the right basic configuration file look? Whats wrong in configuration? I see error 500

<VirtualHost *:9000>
    ServerAdmin [email protected]
    DocumentRoot /var/www/friede/public

    <Directory "/var/www/friede/public">
            Options FollowSymLinks
            ReWriteEngine On
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

<Directory "/var/www/friede/public">
        Options FollowSymLinks MultiViews
        ReWriteEngine On
</Directory>

vandyczech left a reply on Laravel 5.8 Default Apache Virtual Host Configuration

@foram Please share your configuration file ... are you on apache?

vandyczech left a reply on Laravel 5.8 Default Apache Virtual Host Configuration

@FORAM - I have, but no effect ...

APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=84.242.117.60:9000/

vandyczech started a new conversation Laravel 5.8 Default Apache Virtual Host Configuration

How should the right basic configuration file look? Laravel is not working :((

My server run on http://84.242.117.60:9000/ and this is my config, but I see 500 error

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot /var/www/friede/public

    <Directory "/var/www/friede/public">
            Options FollowSymLinks
            ReWriteEngine On
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

<Directory "/var/www/friede/public">
        Options FollowSymLinks MultiViews
        ReWriteEngine On
</Directory>
09 Apr
5 months ago

vandyczech left a reply on Laravel 5.8 - Route Not Working { HTTPS }

@TYKUS - I have this, but still not working ... :((((((((((

LoadModule ssl_module modules/mod_ssl.so

<VirtualHost *:443>
    ServerName behanicko.dev
    ServerAdmin [email protected]
    DocumentRoot /var/www/behanicko.dev/application/public
    SSLEngine on
    SSLCertificateFile "/etc/ssl/certs/behanicko.dev.crt"
    SSLCertificateKeyFile "/etc/ssl/private/behanicko.dev.key"

    <Directory /var/www/behanicko.dev/application>
        DirectoryIndex index.php
        AllowOverride
        Require all granted
    </Directory>
 ErrorLog ${APACHE_LOG_DIR}/error.log
   CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

vandyczech left a reply on Laravel 5.8 - Route Not Working { HTTPS }

@TYKUS -

<VirtualHost 192.168.10.27:80>

   ServerAdmin [email protected]
   ServerName behanicko.dev
   ServerAlias www.behanicko.dev
   DocumentRoot /var/www/behanicko.dev/application/public

<Directory /var/www/behanicko.dev/application/public>
                Allowoverride All
        </Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
 CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

But what 443 port? Please share default configuration for port 443 SSL

vandyczech started a new conversation Laravel 5.8 - Route Not Working { HTTPS }

I have installed aravel 5.8 on ubuntu 18.04 and apache2 with SSL apache self-signed cert ... but basic routes not working .... still i see:

Apache/2.4.29 (Ubuntu) Server at behanicko.dev Port 443

Can you help me please?

I have this route ´´´ Route::view('/add/activity','pages.activity.add')->name('add.activity'); ´´´

resources / views/ pages / activity / add.blade.php

02 Apr
5 months ago

vandyczech started a new conversation LARAVEL 5.4 Sorting Multidimensional Arrays

How I can do this? A-Z for Dir and files too, for each level ...

I want this structure of diir and files:

Dir A
Dir B

        Dir A

                Dir A
                Dir B
                        file a
                        file b

                Dir C

                file a
                file b
                file c

        Dir B
        Dir C

        file a
        file b
        file c

Dir C
Dir D
Dir E
01 Apr
5 months ago

vandyczech left a reply on LARAVEL 5.4 Create Tree For Data From Collection

@GRENADECX - Many thanks. You are king ... for me

vandyczech started a new conversation LARAVEL 5.4 Create Tree For Data From Collection

I have data in mysql and I need create tree wit level like cat , sub, sub sub ... sub sub sub ... and etc... but I dont know how, can u help me please? Of course optimalize for Laravel

Result what I want

Dir A
------  Doc 1
------  Doc 2
Dir B
Dir C
------  Doc 3
--------------- Dir E
Dir D

Mysql table

id  name    parent_id
------------------------
1   A       0
2   B       0
3   C       0   
4   Doc 1   1
5   D       0
6   Doc 2   1
7   Doc3    3
8   E       7
30 Mar
5 months ago

vandyczech left a reply on LARAVEL 5.4 - Keep Session Across Several Requests

@JLRDW - reflash is for several requests ... via documentation official

vandyczech started a new conversation LARAVEL 5.4 - Keep Session Across Several Requests

I have big problem with sharing session data across several requests. I

In my controller I have

$request->session()->put('session_main_category', $request->mainCategory);
$request->session()->reflash();
return redirect()->back();

These data I need sharing via several requests ..

vandyczech started a new conversation LARAVEL 5.4 - Check Variable Exist Or Not

Isset check function is not working on Laravel 5.4. How check the variable exist on the same page? I want to show only something when the variable is exist or is set...

In controller

return redirect()->route('document.add')->with('data', $data);

In blade

@if( !empty($data) )

{{ $data }}
            
@endif
29 Mar
5 months ago

vandyczech left a reply on Problem Conection To Database

Without effect :((

vandyczech started a new conversation Problem Conection To Database

I have Laravel 5.4 on Ubuntu 16.04 with MariaDb, but I cant connect to the db. I see SQLSTATE[HY000] [1698] Access denied for user 'homestead'@'localhost' error, but in .env i have another data then is right ... Where I can rewrite them ... ? Right place for the database configuration is .env thats right?

DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3307 DB_DATABASE=dokumenty DB_USERNAME=phpmyadmin DB_PASSWORD=petr

24 Apr
1 year ago

vandyczech left a reply on Session Remove Item

its not working .. :(

vandyczech started a new conversation Session Remove Item

I have this session has name services, how remove all 0 array from the session in Laravel?

// output session services

array:2 [▼
0 => array:8 [▶]
1 => array:8 [▶]
]

// this construction not work ...

session()->forget( session('services')[0] );

vandyczech left a reply on Get Array Index

This is in only one array ... but i have two arrays and i want get the index of array when the name is B example and equal with key of array with value B ...

vandyczech started a new conversation Get Array Index

I have this arrays ... how can I get the index of array when the name equal with array key name ..

 0 => array
 "name" => "A"
 ]

 1 => array
 "name" => "B"
 ]
16 Apr
1 year ago

vandyczech left a reply on Session Doesnt Work In FIREFOX

@cronix: ok so i try with javascript ... thank you for your time ...

vandyczech left a reply on Session Doesnt Work In FIREFOX

@Cronix yes, but i dont want depend on javascript ...

vandyczech left a reply on Session Doesnt Work In FIREFOX

Can somebody show example?

vandyczech left a reply on Session Doesnt Work In FIREFOX

It sounds good ... But how make this in Laravel 5.6?