kay899

kay899

Member Since 5 Years Ago

Essen

Experience Points
22,190
Total
Experience

2,810 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
181
Lessons
Completed
Best Reply Awards
4
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 5
22,190 XP
Apr
11
6 months ago
Activity icon

Replied to Run Composer Via Artisan Command Or Job?

I know that this is a risk, but in the moment I don't see another solution.

AsI said I am working with October CMS and the use of Private Plugins is sometimes very hard. As long as they don't have any dependencies with other packages it's ok juts to install and update them with git.

But now I have a Vouchershop package which needs a " gloudemans/shoppingcart" plugin. I have added this to composer.json of my Package and now I somehow have to start the process to load this package.

Activity icon

Replied to Run Composer Via Artisan Command Or Job?

Just to show what I am doing:

https://paste.laravel.io/e225868e-572d-413e-b73d-192f5ddad8b7

I work with October CMS, but this is based on Laravel and what I see Jobs is nearly the same.

I go to my folder, clone the Plugin I need. This Plugin has a composer.json with some required Laravel Plugins. So I try to perform the composer updtae to load them.

But composer does not run. I also do not get any real error message, so I have no idea what is happening.

Activity icon

Replied to Run Composer Via Artisan Command Or Job?

I only want to add required packages to an existing package. Not really update my whole project.

Activity icon

Started a new conversation Run Composer Via Artisan Command Or Job?

Hi,

I need to run a "composer update" or "composer require" via an Artisan Bommand or (better) in a Job.

After several hours I can't find a solution for this. Just tried to use shell_exec('composer update); but this will not tun.

The Artisan Command or Job should be executed in an installation on a Digital Ocean Server.

Does someone has an idea how to do that?

Thanks kay899

Feb
21
7 months ago
Activity icon

Started a new conversation Database Connection Not Working In DO Server With Forge

Hi,

I am hosting some websites on a Digital Ocean Server via Forge.

Currently all Database Connections are not working. When I try to restart MySql or Server itself, I only get this feedback:

cat: /root/.forge/provision-25147728.output: No such file or directory

Does someone has an idea, what to do?

Thanks and best wishes

kay899

Jul
31
1 year ago
Activity icon

Replied to Lets Enrypt Not Working In Forge

@Swaz I had a Lets Encrypt SSL installed that site via Forge.

It only terminated today and so I try to install a new one.

Activity icon

Replied to Lets Enrypt Not Working In Forge

@click yes I run this server on php 5.6 correct. No I have not installed anything per manual commands.

Activity icon

Started a new conversation Lets Enrypt Not Working In Forge

Hi,

my current SSL has been terminated. While installing a new one via Lets Encrypt: I get this error message:

https://www.pic-upload.de/view-35717367/Screenshot2018-07-3120.15.49.png.html

Does anyone can help me?

Thanks

kay899

Apr
22
1 year ago
Activity icon

Replied to How To Make IP Error Logging Anonymous?

@Vilfago

This is what I am looking for, but I have no idea where and how to do that

Activity icon

Replied to How To Make IP Error Logging Anonymous?

@Snapey

in the new EU Data Protection IP Addresses are Data which I can interact wth a person.

So I am not allowed to store them like 192.128.138.145, I have to make something like 192.128.138.0

Then I have made them anonymous and are save for the GDPR. :-(

But I have no idea how to do it.

Regarding Debugbar you are right, I use this only locally. (I was only checking locally)

Activity icon

Started a new conversation How To Make IP Error Logging Anonymous?

Hi,

as I have to follow the new European Data Protection Rules I need to make my error logging IP anonymous.

Acually I am using these packages:

barryvdh/laravel-debugbar: https://github.com/barryvdh/laravel-debugbar/blob/master/config/debugbar.php

jenssegers/laravel-rollbar: https://github.com/jenssegers/laravel-rollbar/blob/master/src/RollbarLogHandler.php

Does someone has an idea how I can make my IP addresses anonymous for these packages or with them?

Thanks and best wishes

kay899

Feb
24
1 year ago
Activity icon

Replied to 2nd DB Connection Crashes Site

@fabricecw thanks for the tip with Tinker...

I was able to debug my problem with that.

Activity icon

Replied to 2nd DB Connection Crashes Site

@fabricecw then it is working

Activity icon

Replied to 2nd DB Connection Crashes Site

https://paste.laravel.io/0b73e4f0-2268-4e32-821c-5cb44083aa34

I tried to dd() in dashboard method and constructor, both are not working.

When I delete the "protected $connection = 'remote';" then I can dump again

Activity icon

Replied to 2nd DB Connection Crashes Site

@fabricecw

of course I have two names for that:

database.php:

https://paste.laravel.io/6c861bcb-20c7-4e75-8540-97f62dab8a2c

@crnkovic

debug = true http://sgproject.dev/admin is the route, so no route is working anymore Laravel Version is 5.1

I started to change that, thats why I need to work with two databases parallel now

Activity icon

Started a new conversation 2nd DB Connection Crashes Site

Hi,

I try to use a second DB connection for one of my Models.

The database.php has now two mysql connections.

When I now add "protected $connection = ..." to my Model, the whole Application breaks and I get a blank screen. I even don't get anything logged into the error protocols.

Does someone has an idea, what goes wrong?

Thanks

kay899

Jul
23
2 years ago
Activity icon

Replied to Using YAML Data In View?

Please ignore - could not work...

Activity icon

Started a new conversation Using YAML Data In View?

In a module I try to use YAML Data in an array to build my index list.

When I change the YAML file and dump in the ServiceProvider in the Blade extension everything works fine.

But when I dump the var in my view it somehow gets not updated when I change the YAML file.

Here is my code so far: https://paste.laravel.io/e8goM

Does someone has an idea why?

Thanks

kay899

Jun
16
2 years ago
Activity icon

Replied to How To Schedule API Calls For Forge Deployment

How can I make a Job that checks every e.g. 3 minutes if the status has been changed?

Is there something like, if this is false, then retry this job in 3 minutes?

And if it then is true, Job is finished!

How can I make this behavior for a Job?

Jun
15
2 years ago
Activity icon

Started a new conversation How To Schedule API Calls For Forge Deployment

Hi,

I would like to build an application, where a client can decide to "go live" himself. When clicking on a button I would like to start the four needed API calls for Forge:

  1. Create Site
  2. Install GIT Repository
  3. Change ENV file
  4. Deploy Application

I will do these calls with a Forge API SDK package. That is not my probem.

Actually I don't have a good idea how to schedulde these calls? I know that steps 1 and 2 can tale 30 seconds up to over 3 minutes till they are finished.

So for example step 1 gives me back the SiteID in Forge, but the status will be "installing". How can I make somekind of Job that checks if this status is not "installing" anymore and then starts the next API call for step 2?

Home someone could give a some hints how to deal with that?

Thanks

kay899

Apr
02
2 years ago
Activity icon

Started a new conversation Blade @push And @stack Not Working In <head> Section (?)

Hi,

I try to use @push in my sidebar for adding CSS and JS for Select2 into my layout file.

In my sidebar view I have defined the @push for css and js, but only the js part show up in my HTML code. Not the cs part in my section.

What is my mistake? Or canÄt I use it for section?

Here is my code for app.blade and sidebar.blade:

https://paste.laravel.io/p4QBO

https://paste.laravel.io/RowKK

Thanks for our help

kay899

Mar
18
2 years ago
Activity icon

Started a new conversation How To Show Only Rows From Left Table In A Join?

Hi,

I would like to show only the rows from the left table of the following join:

https://paste.laravel.io/ln9xn

How can I do that?

Thanks

kay899

Activity icon

Started a new conversation Stripe Credit Card Form Like On Forge.laravel.com?

Hi,

I would like to use Stripe with a credit card form like on https://forge.laravel.com/auth/register

My problem is, that I don't find any tutorials or examples how to build it in that way.

Only the "newer" version with a combined credit card field in one line, which I don't want to use.

Can someone help me with a ink to such a tutorial or a code example?

Thanks

kay899

Feb
09
2 years ago
Activity icon

Replied to Queued Events "Server Reported NOT_FOUND"

Hi does someone has an idea how to solve this?

I am on Laravel 5.4 and run exactly into that error message.

Using beanstalkd queue via Forge.

Thanks kay899

Feb
05
2 years ago
Activity icon

Started a new conversation How Can I Get The Error Of A Failed Job?

Hi,

I have this job here:

https://paste.laravel.io/q3prx

O n my local machine it is working perfectly, but now on my server it fails, but it didn't throw any exception.

How can I get the data from the error occurring, so that I can log that in my failed() method?

Thanks

kay899

Feb
03
2 years ago
Activity icon

Started a new conversation Error While Using Envoy In Controller

Hi,

I try to start "envoy run..." in a controller (or later a Job).

Here is my code so far:

https://laravel.io/bin/Xy207

All I get is this error:

ProcessFailedException in ForgeController.php line 28: The command "~/.composer/vendor/bin/envoy run updateenv --provider_id=49" failed.

Exit Code: 1(General error)

Working directory: /Users/hoteldatenservice/code/fewoweb

Output:

Valet requires Brew to be installed on your Mac.

Error Output:

Valet and Brew are installed on my Mac.

Any idea why I can do?

Thanks

kay899

Activity icon

Started a new conversation How To Use "envoy Run" In A Job?

Hi,

I need to run "envoy run updateenv --provider_id=49' in a Job, but I have no idea how to do that correctly.

Tried it via Artisan:call(), which failed as this is no real Artisan Command.

Also tried it directly with a Symphony Process, but also with no luck.

Here is my code so far (both ways are commented out actually):

https://laravel.io/bin/yGn53

Has someone an idea how I can start a envoy run command directly via a Job or a Command?

Thanks

kay899

Jan
29
2 years ago
Activity icon

Started a new conversation How To Delay A Job In Larvel 5.2

Hi,

I have a Listener that should start another Event after successfull execution:

https://laravel.io/bin/De21w

My problem now is, that I need to wait a minute before the execution of the next Event, as Forge need some seconds to setup the new page.

When i try to "delay()" the execution, I'll only get this error:

[Symfony\Component\Debug\Exception\FatalThrowableError] Call to a member function delay() on array

How can I delay the execution correctly?

Thanks

kay899

Jan
28
2 years ago
Activity icon

Replied to How Can I Use Data Of My Models In Envoy?

ok, I found our that with

@include('public/index.php')

the above code is working and I can get my Providers data.

One last question: how can I use data from a session on Envoy?

Activity icon

Replied to How Can I Use Data Of My Models In Envoy?

Does someone has an idea on this? Thx

Jan
01
2 years ago
Activity icon

Started a new conversation How Can I Use Data Of My Models In Envoy?

Hi,

I would like to use some data (like Domain) from my Model in my Envoy.blade.php file.

How can I do that?

I try it this way with no real success:

@setup
    use App\Models\Provider;

    $provider = Provider::find(28);
@endsetup

@servers(['web' => ['[email protected]']])

@task('foo', ['on' => 'web'])
     cd {{ $provider->domain }}
     ls
@endtask

Thanks

kay899

Activity icon

Replied to Change Deploy Script With A Recipe?

@ejdelmonico thanks very much for that hint.

That was really helpful.

Dec
31
2 years ago
Activity icon

Started a new conversation Change Deploy Script With A Recipe?

Hi,

is it possible to change the Deploy Script of an App in Forge with a Recipe?

I would like to setup new Webs in Forge automatically. Found a Package with most of the features I need. Only thing missing is how to change the Deploy Script to not use DataBase Migration (as my Apps don't need it).

Or would it be possible to change the "default" Deploy script which is copies while setting up a new site?

Thanks for your help

Best wishes kay899

Dec
04
2 years ago
Activity icon

Started a new conversation MySql In Laravel Valet Always Asking For Default Values?

Hi,

I am using Laravel Valet for the first time instead of XAMPP (which I used before).

Now I noticed that MySQL used in Valet is always asking for default values, which never happened in the MySQL version of XAMPP before.

I'll get errors like:

SQLSTATE[HY000]: General error: 1364 Field 'status' doesn't have a default value

status in a boolean field for which I never have defined any defaults or nullable in my other MySQL.

Do I really have to define a default value for a boolean field? Or an integer field like created_by?

Thanks for your help

kay899

Nov
06
2 years ago
Activity icon

Replied to How To Store A Special Relation?

Thank you all for your replies. I just wanted to find out if there is another way, instead of using Room as a separate Model.

If not, I need to go that way, even if I don't like it :-)

Nov
05
2 years ago
Activity icon

Replied to How To Store A Special Relation?

I know it's not the big thing to make an extra Model. But I still believe that I don't need it as I don't want to store separate data for the rooms instead of the Beds Relation. I only need Rooms for a sort of "grouping".

The clients should't change their Rooms in their own as the number of Rooms depends on the Plan they have chosen (Smallest Plan inly shows 2 Rooms per Accommodation...).

See here for the UI: http://www.directupload.net/file/d/4530/e2p7qxcp_png.htm

Bed is a Model, yes. It actually has three Rows (as I have three different Bed Types to offer per Room) and I only store a Name of the Bed Type and an icon-name for later use.

Activity icon

Replied to How To Store A Special Relation?

For the moment this would be too much overhead :-(

Activity icon

Replied to How To Store A Special Relation?

@Snapey

What is Accomodation_Bed? Sorry but I don't understand this. :-(

As far as I understand I store the belongsToMany relation in such a kind of table right?

Schema::create('accommodation_bed', function(Blueprint $table)
        {
            $table->increments('id');
            $table->integer('accommodation_id')->unsigned()->index();
            $table->foreign('accommodation_id')->references('id')->on('accommodations')->onDelete('cascade');
            $table->integer('bed_id')->unsigned()->index();
            $table->foreign('bed_id')->references('id')->on('beds')->onDelete('cascade');
            $table->string('room');
            $table->tinyInteger('amount');
        });

But this is not a real Model?!

The amount should be stored as a pivot value in that relation table.

Activity icon

Replied to How To Store A Special Relation?

ok, sorry I try to comment that better:

"beds" => array:2 [▼
    1 => array:2 [▼ // Room #1, Single Bed (#1), Double Bed (#2)
      0 => "1"
      1 => "2"
    ]
    2 => array:1 [▼ // Room #2, Double Bed (#2)
      0 => "2"
    ]
  ]

Relation:

    // beds relation in Accommodation Model
    public function beds()
    {
        return $this->belongsToMany('App\Models\Bed')->withPivot('room', 'amount');
    }
Activity icon

Replied to How To Store A Special Relation?

@Snapey

For the moment I want to keep my idea of not creating a room model. For later use, perhaps it will makes sense...

My problem is, that I cannot store the same bed type for the same accommodation in two different rooms.

Here is what my form gives to controller (1 or 2 => is the room"id"):

"beds" => array:2 [▼
    1 => array:2 [▼
      0 => "1"
      1 => "2"
    ]
    2 => array:1 [▼
      0 => "2"
    ]
  ]

So bed type 2 need to be stored for room 1 and 2, but it does get saved only for room 2:

http://www.directupload.net/file/d/4530/qshz2ee2_png.htm

Activity icon

Replied to How To Store A Special Relation?

Is it possible to use my "Room" like this, or do I need to add a real Room Model?

Activity icon

Replied to How To Store A Special Relation?

@tisuchi

I look for a way to store my relations as described in my post. But "Beds" are not a Model which can have a relation, only some Order or Grouping thing.

Activity icon

Replied to How To Store A Special Relation?

@tisuchi I know these videos.

What example do you mean?

Activity icon

Started a new conversation How To Store A Special Relation?

Hi,

I have an Accommodation Model which contains the name and description of an Accommodation. Assuming that the Accommodation has two differente sleeping rooms (which is actually not a Model as I don't need to store any data for it) I now want to store the types of my Bed Model which are in this Room and the amount of them.

So lets say Accommodation #1 has Room #1 with 1 Double Bed and 2 Single Beds and Room #2 with 1 Queenside Bed and 1 Stock Bed.

As my Room is not a Model, how can I store that relation? I thought, that I could do it with a BelongsToMany table like this:

        Schema::create('accommodation_bed', function(Blueprint $table)
        {
            $table->increments('id');
            $table->integer('accommodation_id')->unsigned()->index();
            $table->foreign('accommodation_id')->references('id')->on('accommodations')->onDelete('cascade');
            $table->integer('bed_id')->unsigned()->index();
            $table->foreign('bed_id')->references('id')->on('beds')->onDelete('cascade');
            $table->string('room');
            $table->tinyInteger('amount');
        });

But of course I cannot store multiple entries for my Accommodation/Bed Relation.

Does someone has an idea how I can to that?

Thanks

kay899

Oct
09
3 years ago
Activity icon

Started a new conversation How To Find Unrelated Objects

Hi,

I have a "Imagefolder" Model which belongsToMany "Module" Model.

Now I need to find all "Imagefolder" Model objects, which to not have a relation to the "Module" Model?

How can I do that?

Thanks kay899

Sep
28
3 years ago
Activity icon

Replied to How To Rename An Image File On Server?

Thanks @tomi that is working :-)

Then I just have to get my images/ out of my stored URL, but this in no problem :-)

Activity icon

Replied to How To Rename An Image File On Server?

When I dd() this, I'll get this:

array:6 [▼
  0 => "horbucher/.DS_Store"
  1 => "horbucher/0182d7c9-c7ce-414f-8607-ef55fc455a37.jpg"
  2 => "horbucher/78c55698-c7bc-4959-a5af-184f03f0a580.jpg"
  3 => "horbucher/7e1922dc-768c-4332-9387-7da2b6507e1a.jpg"
  4 => "horbucher/ce4f6a4f-a5a0-4055-91bd-582edb6eaa1b.jpg"
  5 => "horbucher/d44ca0db-69a8-4ad8-8971-a4cf6ecc1d44.jpg"
]