pavlen

pavlen

Member Since 4 Years Ago

Experience Points 6,700
Experience Level 2

3,300 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 20
Lessons
Completed
Best Reply Awards 0
Best Reply
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    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 Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

14 Mar
3 months ago

pavlen left a reply on Get Pagination For Full MySql And DB::select Query

Hi in this case,get error :

Call to undefined method Illuminate\Database\MySqlConnection::selectRaw()

pavlen left a reply on Get Pagination For Full MySql And DB::select Query

@GORAKHYADAV - Hi, thanks for time,in this case get error


Call to undefined method Illuminate\Database\MySqlConnection::selectRaw()

pavlen started a new conversation Get Pagination For Full MySql And DB::select Query

Hi,

is there a way to use Laravel pagination in this situation :

Query for full mysql search :

   $key = ' test word';

   $q = DB::select(' SELECT * , MATCH(col 1,col 2) AGAINST ("'.$key.'" IN BOOLEAN MODE) AS score FROM test WHERE MATCH(col 1,col 2) AGAINST ("'.$key.'" IN BOOLEAN MODE)');

Query is ok, I get good results, but cant use clasic ->pagination() gett error, that can use pagination on array.

Thanks, Pavle

12 Mar
3 months ago

pavlen started a new conversation Create Dinamic Routes For News

HI, is there a way to create dinamic routes for news items ?

In my table I have fileds:

Id           Title                           Text

1            FIrst news                 Bla,Bla,bla

Currently, in my routes i use:

Route::get('/news/{id}/full-text','[email protected]');

In Front Controller :

public function getNews($id){

$news = News::findOrFail($id);

return view('news')->with(compact('news');

}

And all working fine, except url is not fine:

So,currently URL will be : www.domain.com/news/1/full-text

Is there a way, to create dinamic routes like this :

 www.domain.com/news/first-news

To use name of news (title row in Db),to create friendly url ?

Thanks, Pavle

17 Dec
6 months ago

pavlen left a reply on Use Diferent Values From Colection Item

Thanks for time,P

pavlen started a new conversation Use Diferent Values From Colection Item

Hi, i use this to get lat five items inserted in table :

$items = Data::orderBy('id', 'desc')->take(5)->get();

And get collection :

Collection {#680 ▼
  #items: array:5 [▼
    0 =>  Data {#681 ▶}
    1 =>  Data {#682 ▶}
    2 =>  Data {#683 ▶}
    3 => Data {#684 ▶}
    4 => Data {#685 ▶}
  ]
}

And all is fine.

Now, is there a way, to use diferent atributes for diferent items, etc:

For first item [0] to get id

For second item [1] to get name

For third item [2] to get date

For four item [3] to get id

For five item [4] to get img

Thanks in advance, P

07 Dec
6 months ago

pavlen started a new conversation Routes Creating

Hi,

I have table,where are stored all pages,like this:

id page_name

1 page-one 2 page-two

...

When creating route,all is ok in this case:

Route::get('/{page-one}','[email protected]');  // www.example.com/page-one

    public function getPage($page){
        $test = Page::where('page_name','=',$page)->first();
       return view('page', compact('test'));
    }

Now, ist here a way, to generate route dinamicly in web.php, to list all pages from table or to write route manualy for every page ?

Thanks in advance, Pavle

31 Oct
7 months ago

pavlen started a new conversation Craftable Admin Panel

Hi all,

hope you are well ?:)

Have ony use : https://www.getcraftable.com/ for admin panel package ?

Looks very good, documentation is fine, so just to check your expirience ?

Best regards,

Pavle

18 Nov
1 year ago

pavlen left a reply on Is Basic Laravel Auth Safe For Admin Panel?

@DarkRoast

hi,thanks for time.. any sample for that ?

Thanks,

P

pavlen left a reply on Is Basic Laravel Auth Safe For Admin Panel?

@Sanpey

thanks for time, I think same like you, but would like to hear that from some experienced user..

Thanks

pavlen started a new conversation Is Basic Laravel Auth Safe For Admin Panel?

Hi,

what is your opinion, is basic Laravel Auth safe for admin panel or is better to use some Auth package ?

Thanks in advance,

Pavle

pavlen started a new conversation Laravel Order Managment System

Do you have any syggestion for Laravel 5.5 package for order system managment ?

04 Nov
1 year ago

pavlen started a new conversation Live Filters From Database

Hi,

what is your recomendation for live filters on home page, to get data from database. My idea is to create live ajax filters, to show filter result.

I found some interested packages :

  1. https://github.com/aginev/search-filters

  2. https://github.com/Tucker-Eric/EloquentFilter#default-settings

so, what is your reccommendation ,to use custom ajax filters or you have expirience with some laravel packages for that ?

31 Oct
1 year ago
30 Oct
1 year ago

pavlen started a new conversation Laravel Online Shop - Custom Or Get Package ?

Hi all,

what is your suggestion for E-commerce Laravel solutions ?

To create shop from scratch or to take some of Laravel shop packages ?

In case that your suggestion is to use existing packages, can you recommend some E-commerce package ?

Thanks in advance,

P

21 Oct
1 year ago

pavlen left a reply on Method [[email protected]] Does Not Exist.

@tykus

this solve problem :

Route::patch('userupdate/{id}','[email protected]');

Thanks a lot,

Pavle

pavlen started a new conversation Method [[email protected]] Does Not Exist.

Hi,using Laravel 5.5. When opet Edit page, all si fine, data from Database is ok, but when try to update record get error :

BadMethodCallException
Method [[email protected]] does not exist.

My routes for edit and update:

Route::get('useredit/{id}/edit', '[email protected]');

Route::get('userupdate/{id}', '[email protected]');
Route::resource('userupdate','[email protected]');

AdminController function:

    public function userEdit($id)
    {
        $user_edit = User::findOrFail($id);
         return view('admin/user/edit',compact('user_edit'));
    }

Blade page for edit:


 {!! Form::model($user_edit,['method'=>'PATCH','enctype'=>'multipart/form-data', 'action'=>['[email protected]' , $user_edit->id]]) !!}

                                       <div class="col-md-12 form-group">
                                        {!!  Form::label('name','Name:'); !!} 
                                        {!!  Form::text('test',null,['class' => 'form-control']); !!} 
                                       </div>
                                        <div class="form-group">
                                            {!!  Form::submit('Save',['class' => 'btn btn-primary form-control']); !!}                                   
                                        </div>
                                        {!! Form::close() !!}
07 Jul
1 year ago

pavlen left a reply on Knowledge Level Of JavaScript For Starting With Vue

You are truly right! :) I see that after one day,thanks for time!

06 Jul
1 year ago

pavlen left a reply on Knowledge Level Of JavaScript For Starting With Vue

Thanks and best regards!

P

05 Jul
1 year ago

pavlen started a new conversation Knowledge Level Of JavaScript For Starting With Vue

Hi all,

just would like to hear word from you :

I have basic JS knowlege,do You suggest to immediately start with Vue.js or still to work on JS upgrade and than go to Vue.

Thanks a lot, P

27 May
2 years ago

pavlen started a new conversation Delete Single Value From Column

Hi,

have this data value in table, for Model: Test:

Id   colA   colB   colC

13      aa     bb      cc

14      dd    dd      gg

Idea was this query:

$dell = Test::where('id', 14)->where('colB', 'like', 'dd')->get();
$dell->delete();

But after get query result, I get all values for id=14. I need to get and delete only "colB" value for specific id.

Thansk,

Pavle

15 Mar
2 years ago

pavlen started a new conversation E-commerce Packages Recommendation

Hi,

after searching for Laravel E-commerce solutions, found that "https://github.com/Crinsane/LaravelShoppingcart" is on the top of list. What is your expirience with this package ? Thanks in advance!

07 Sep
2 years ago

pavlen started a new conversation Using Laravel On "external" Hosting...

Hi, I have current presentation on shared hosting, with e-mail accounts.

Is there a way to use shared hosting for e-mail service for domain ,etc: www.domain.com and also to redirect that domain to external VPS server ,where I have Laravel presentation ?

I try some alternative ways to use Laravel on shared hosting, but too much problems :)

Tnx in advance,

Pavle

17 Mar
3 years ago

pavlen left a reply on Get Latest Updated Row Date

Hi, nothing :) Doing just like you :) But just ask is there maybe other solution...

Tnx for time

pavlen started a new conversation Get Latest Updated Row Date

Hi,

is there some Eloquent function to get update_at value from table ? Just to get date and time of last updated row. I can to this with basic query, but I am interested is there some better solution ?

Tnx,

Pavle

26 Oct
3 years ago

pavlen left a reply on Laravel 5 Gallery Sugestion

Tnx for time,

Pavle

pavlen started a new conversation Laravel 5 Gallery Sugestion

Hi ,

i have idea to create a custom picture gallery, with CRUD option in admin panel...

But before creating custom solutions, just want to consult best Laravel forum for sugestion :)

So, do you have any favorite package ?

Tnx,

P

10 Sep
3 years ago

pavlen started a new conversation Disable Users From All Views

Hi,

is there possibility to set easy access/denied for some users ?

Etc, when user with id = 4 is loged on, he have access only to one view and anything more on aplication..

I found some solutions with middleware, but just to check is there some easy solutions

04 Sep
3 years ago

pavlen started a new conversation DomPdf Render Error

Hi, using DomPdf to create PDF from html.

        $html = '<html><head><body>Test</body></head></html>
        $pdf = \App::make('dompdf.wrapper');
        $pdf->loadHTML($html);
        $pdf->render();
        return $pdf->stream();  

Get error:

Call to protected method Barryvdh\DomPDF\PDF::render() from context 'App\Http\Controllers\TestController'

When remove "

Create PDF file,but mess html code...

Tnx, P

03 Sep
3 years ago

pavlen left a reply on Laravel Link Route To Wrong View

@bobbybouwmann

All is ok and everuthing work fine for couple of weeks, that is wierd for me :)

I will try to check all...

Tnx !

pavlen left a reply on Laravel Link Route To Wrong View

@bobbybouwmann

hi,

I think this comand is for Laravel 5.1 ,I use 5.0...

There are no commands defined in the "view" namespace.

The view thet show come from other directoru caled :

resource/views/email/index.blade.php

pavlen started a new conversation Laravel Link Route To Wrong View

Hi,

get very wierd situation,all works fine,and last time I try one link from my menu,see that routes link to wrong view.

Here is route:

Route::get('main', 'TestController@index');

In controller is this for return:

    public function index(){    
        
         $pagination = Test::latest()->paginate(10);
        
            
         return view('orders.index',compact('pagination')); 
    } 

All was fine,but now,when go to

mysite/main, go to totaly diferent view?

Any idea ?

Tnx, P

pavlen left a reply on Save PDF File With Dompdf

Solved on this way :

 return PDF::loadHTML('<h1>Test</h1> ')->save('/path//my_stored_file.pdf');

pavlen started a new conversation Save PDF File With Dompdf

Hi,

using Dompdf to store data in pdf file:

This function work fine :

        $pdf = \App::make('dompdf.wrapper');
        $pdf->loadHTML('<h1>Test</h1> ');
        return $pdf->stream();

Now,when try

        $pdf = \App::make('dompdf.wrapper');
        $pdf->loadHTML('<h1>Test</h1> ');
        file_put_contents("testl.pdf", $pdf->output());

Get error:

file_put_contents(order_email.pdf): failed to open stream: Permission denied

Do I need to create some extra folder for saving file or something ?

Tnx, P

02 Sep
3 years ago

pavlen left a reply on Cache Problem After Edit App.blade.php

Solved with:

php artisan cache:clear 
chmod -R 777 storage folder
php artisan dump-autoload

now can access to login page...

pavlen started a new conversation Cache Problem After Edit App.blade.php

Hi,

after simple text edit in

resource/views/app.blade.php

get this error :

file_put_contents(/var/www/html/laravelt/storage/framework/views/700be8b24092a190f016e41dc01b9e77): failed to open stream: Permission denied (View: /var/www/html/laravel/resources/views/app.blade.php)

any idea?

Tnx, P

pavlen left a reply on Mark All Fields Fillable In Model

No ,

tnx a lot !

P

pavlen left a reply on Mark All Fields Fillable In Model

Hi pmail,

I found this in documentation , just like to know for any other possibility...

Tnx bro:)

pavlen started a new conversation Mark All Fields Fillable In Model

HI,

is there command to set all data fillabe in model ?

I try with :

protected $fillable = array('*');

but not work,

tnx, p

17 Aug
3 years ago

pavlen left a reply on Blade Check Box Value

Tnx to all :)

pavlen started a new conversation Blade Check Box Value

HI, have check box in Blade:

{!! Form::checkbox('reg',1,false) !!}

If box is checed,value is 1,that is ok,but when not checked,value is null.

IS there possibility to send value 0 to conttroller if box is uncheked?

P.S. I can manipulate with values in controller,of course, but just interesting is there away to do that directly in Blade...

Tnx, P

14 Aug
3 years ago

pavlen started a new conversation Insert Array Data With Eloquent

Hi,

this is function for saving data in DB.Work fine,but I am interesting is there Laravel way for this, instead foreach loop:

     $checkBox = array();
         $checkBox = Input::get('catnew');
         $id = Input::get('id');
         
         $newSafety = new Extra;
         
         foreach($checkBox as $safety){
             
             $newSafety->offer_id = $id;
             $newSafety->car_id   = $safety;
             $newSafety->car      = 15;
             $newSafety->save();
         
         }

11 Aug
3 years ago

pavlen started a new conversation Cant Show Video In Blade

HI,

trying to show video in Blade,but get error :

<p>Video preview:</p>
<video width="640" height="360" controls preload="none">
    <source src="/var/www/dev.test/public/videos/test.mp4"  type="video/mp4" />
    <source src="/var/www/dev.test/public/videos/test.mp4"  type="video/ogg" />
</video>

Error:

GET http://dev.test/var/www/dev.test/public/videos/test.mp4 

Permission of videos folder iz 0777...

Inside of laravel,no problem

tnx

pavlen started a new conversation Import Video From Directory

Hi,

is there possibility to import video in Laravel ?

So,to store movie in folder,create command,import,to get that file and move to public/videos folder?

pavlen left a reply on Creating Has Many Relation

Problem vas pivot table:

need to be : category_car

now is ok,tnx a LOT!

pavlen left a reply on Creating Has Many Relation

Yeah,

data are in database,and also all relations are like you post here, with corect namespaces..

pavlen left a reply on Creating Has Many Relation

@bobbybouwmann @dfaux

you are right about convention :)

I create table car_category,put some data and than try with:

$car = Car::find(1);
          //  dd($car); //this back me ok result
            foreach($car->categories as $category)
            {
                dd($category->name);  // no back result
            }

pavlen left a reply on Creating Has Many Relation

@dfaux

Tnx You a lot!

I start with your orders, so hust to chec,my car_category table will be like this ?

Schema::create('car_categories', function(Blueprint $table)
        {
            $table->integer('car_id');
            $table->integer('cat_id');
            $table->timestamps();
        });