cschoeni

cschoeni

Member Since 3 Years Ago

Bern

2nd Level Assurance at Swisscom

Experience Points 18,850
Experience Level 4

1,150 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 224
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.

03 Mar
2 years ago

cschoeni started a new conversation For What Is The Local Storage?

I don't understand for what is the local storage? Can you help me and give me a feedback for the basic flow...

It work's with the local Storage for private profile images? When I output the images only on the member area?

Thanks for your Help

28 Feb
2 years ago

cschoeni left a reply on Graham Campbell Flysystem Display An Images Into My Website From Dropbox

Hallo Jeimz173 I habe at the Moment the same Problem. Could you solve the problem?

Tanks and have a nice day Christoph

21 Feb
2 years ago

cschoeni left a reply on V-for Data From Database

@WebKenth thanks dir your Input i change this in my Code.

cschoeni left a reply on V-for Data From Database

Des you habe right, thanks dir your tip

19 Feb
2 years ago

cschoeni left a reply on Ouput Diferent Object From Vue

I found failure. When you set the value from your array then you gan output this with array[NUMBER].parameter like this example in the buttom.

productNew: '1',
            myarray: [
            {
              id: '',
              foo: '',
          bar: '',
            }
            ]

Now with this values work the normal output with (also without @):

<p>Hello {{ myarray[12].foo }}

cschoeni left a reply on V-for Data From Database

I found the Fail

I give the parameters to data with this line

this.sales = response.data;

In my data i had this:

sales: [
            {
              id: '',
              name: '',
              customerSegment: '',
              upload: ''
              download: ''
              mobile: '',
              price: '',
              sale: '',
              started_at: '',
              ended_at: '',
              created_at: ''
            }
            ]

now i became the value per example 89 when i take this in my template

<td><strong>{{ sales[productOld-1].price }}.- CHF</strong></td>

Thank you, everyone for help and support, It's amazing community

18 Feb
2 years ago

cschoeni started a new conversation Ouput Diferent Object From Vue

Hello guys

How to print an element from an array?

like this example:


in the data came a Request from .. api/v1/myarray
```php
return App\Myarray::all();

Inside that you have id, name, address, birthdate etc....

data () { return { myarray: [] } }, ...

// in Template

<p>Hello {{ myarray[12].name }}

Is this output correct in HTML?

cschoeni left a reply on V-for Data From Database

Yes when i open the get request i became the json data on my chrome. and my Vue Template has also a select Field. In this i have the subscriptions inside. THis works also...

17 Feb
2 years ago

cschoeni left a reply on V-for Data From Database

Sorry for my long answer. It was many trouble on work...

// on web.php
Route::get('/api/v1/sales', function () {
    return App\Subscription::all();
});

I had a lucky by my tests. When i make the output in my template

<td>{{ sales[productOld-1] }} CHF</td>

I became the result:

{ "id": 1, "name": "Vivo XS", "customerSegment_id": 1, "price": 89, "sale": 0, "started_at": "2017-02-17 06:06:13", "ended_at": "2017-02-17 06:06:13", "created_at": "2017-02-17 06:06:13", "updated_at": "2017-02-17 06:06:13" } CHF

But i dont can ouput the value price in the {}. I testet it with:

sales[productOld-1].price

When i output the lines on my console in chome, its the result only the price.

$vm0.$data.sales[NUMBER].price

// like
$vm0.$data.sales[12].price

Thanks for your help and feedback

12 Feb
2 years ago

cschoeni left a reply on V-for Data From Database

Exact thats my problem. i make a array in my sales data. Now what i make new?

How i can delete the array in may sales: []? Can you give me a link for a reference Workflow for Vue?

cschoeni left a reply on V-for Data From Database

This is my Vue script

<script>
    export default {
        data () {
          return {
            contractId: '',
            zip: '',
            productOld: '',
            productNew: '',
            sales:[]
          }
        },
        created() {
          axios.get('/api/v1/sales').then((response) => {
              console.log(response);
              if (response.status == 200) {
                this.sales = response.data.constrains;
              }
          });
        },
        methods: {
          addSubmit() {
            // make ajax request and pass the data. I'm not certain how to do it with axios but something along the lines of this
            axios.post('/sales', {
                contractId: this.contractId,
                zip: this.zip,
                productOld: this.productOld,
                productNew: this.productNew
            });
          },
        }
      }
</script>

and this is my result Object in Chrome

contractId:""
productNew:""
productOld:""
sales:Array[4]
0:Object
contractId:"1273643453"
created_at:"2017-02-12 13:01:39"
id:1
productNew:"Vivo XL"
productOld:"Vivo M"
updated_at:"2017-02-12 13:01:39"
zip:"2543"
1:Object
2:Object
3:Object
zip:""

cschoeni started a new conversation V-for Data From Database

Hello Guys

I try my luck with Vue. My Problem is from the output.


sales:Array[4]
0:Object
contractId:"1273643453"
created_at:"2017-02-12 13:01:39"
id:1
productNew:"Vivo XL"
productOld:"Vivo M"
updated_at:"2017-02-12 13:01:39"
zip:"2543"
1:Object
2:Object
3:Object

This is the output Object in the Vue Root. But the problem is i can't output this with v-for.


<tbody>
    <tr v-for="sale in sales">
      <td v-text="sale.id"></td>
      <td v-text="sale.contractId"></td>
      <td v-text="sale.zip"></td>
    </tr>
</tbody>

  • It's in the app div.
  • I testet it with the {{ sale.id }} sytax
  • but my table is empty
02 Feb
2 years ago

cschoeni left a reply on How To Can Print User Using Search Filter Functionality?

With which Database Query do you have a problem?

My first ide go like this way:

Student::where('status',1)->where('created_at', [date('Y-m-d', strtotime($dt->month)])-get();

cschoeni left a reply on Inception

Its a first Idea but i go like this way.

<?php

namespace App;

use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;

class TableA extends Authenticatable {
    
    public function dataFromTableD ($tableA_id, )
    {
        // Start at Table A -> to Table B
        $tableB = TableB::where('tableA_id', [$tableA_id])->get();
        $tableC = TableC::where('tableB_id', [$tableB->id])->get();
        $tableD = TableD::whrere('tableC_id', [$tableC->id])->get();
        return $tableD;
    }
}

cschoeni left a reply on Weird Eloquent Results On 'exact Match' Db Queries

I testet this with my Test User data and it works.

Select * From Users WHERE `uuid` Like '5%'

Users::where('size', 'like', 5%’)->get();
23 Jan
2 years ago

cschoeni left a reply on Delete A Folder With Storage Or File Class

no he didn't delete.. But thanks for your input.

cschoeni left a reply on Delete A Folder With Storage Or File Class

Storage::deleteDirectory('/storage/app/public/persons/photos/5');

I testet also with

Storage::deleteDirectory(storage_path('app/public/persons/photos/5'));

it not works.

cschoeni started a new conversation Delete A Folder With Storage Or File Class

How i can delete a Folder in public oder private storage.

It' didn't work with

File::delete(storage_path('app/public/persons/photos/5'));

But The folder exist. i controlled this with the function

File::exists(storage_path('app/public/girls/photos/5')
23 Oct
2 years ago

cschoeni started a new conversation Crop Image Upload

I work with the this Image Crop Package (http://codecanyon.stbeets.nl/). But i have a Problem with save the base64 image in PNG oder JPEG.

How i can convert base64 in jpeg or png? Its beter i change the Package?

Thanks for our help Christoph

31 Aug
2 years ago

cschoeni left a reply on Laravel 5.3 - Error With "npm Install Laravel-elixir"

I removed now my laravel/homestead maschine and now i try again with gulp.

cschoeni left a reply on Laravel 5.3 - Error With "npm Install Laravel-elixir"

No i make all what he write in this dicussion.

cschoeni started a new conversation Laravel 5.3 - Error With "npm Install Laravel-elixir"

When i install a fresh Laravel Project and make all what is read on Laravel Page "https://laravel.com/docs/5.3/elixir" its my error every time on laravel-elixir.

[email protected]:~/Code/Laravel/example$ npm install laravel-elixir
/home/vagrant/Code/Laravel/example
└── (empty)

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm ERR! Linux 3.19.0-25-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "laravel-elixir"
npm ERR! node v6.4.0
npm ERR! npm  v3.10.7
npm ERR! path ../semver/bin/semver
npm ERR! code EPROTO
npm ERR! errno -71
npm ERR! syscall symlink

npm ERR! EPROTO: protocol error, symlink '../semver/bin/semver' -> '/home/vagrant/Code/Laravel/example/node_modules/accord/node_modules/.bin/semver'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /home/vagrant/Code/Laravel/example/npm-debug.log
npm ERR! code 1
21 Aug
2 years ago

cschoeni left a reply on How Change The Date Format Direct In The Migration?

Ok Thanks all for your Help.

cschoeni left a reply on How Change The Date Format Direct In The Migration?

Thanks @ctroms, but when i put this in my User Model what i make after this with the Date. When i save a new User is the brithdate also Y-d-m or when i ouput the brithdate in blade came also the format "Y-d-m".

cschoeni started a new conversation How Change The Date Format Direct In The Migration?

Hello Guys Is there a way to change the date format directly in the migration like this?

´´´php $table->date('birthdate')->format('d.m.Y'); ´´´ Thanks for Help

03 Aug
2 years ago

cschoeni left a reply on Larave 5.2 - File Upload Not Work

Thank you for your help. I can found the failure. I work for upload with slim upload (Project on CodeCanyon), the problem was the js file form this.

With the normal Code it works exactly.

<input type="file" name="slim[]" required />

Your answers led me to the idea

cschoeni left a reply on Larave 5.2 - File Upload Not Work

Hello RonB1985

Thanks for your message.

i change this with the Collective Form...

{{ Form::open(array('url' => route('artist.photo.store'), 'method' => 'post', 'files'=> true)) }}

Now i became this...

<div class="modal-body">
    {{ Form::open(array('url' => route('artist.photo.store'), 'method' => 'post', 'files'=> true)) }}
        {!! Form::token() !!}
            <div class="slim" data-label="Drop your avatar here" data-size="240,240" data-ratio="1:1">
                <input type="file" name="slim[]" required />
            </div>
            </div> <!-- /.modal-body -->
            <div class="modal-footer">
                  <button type="button" class="btn btn-default" data-dismiss="modal">Abbrechen</button>
                  <button type="submit" class="btn btn-primary">Speichern</button>
            </div>
    {!! Form::close() !!}
</div>

Result with $request->all():

array:2 [▼
  "_token" => "Gi3Uip2kiwWaEM3QojNg2AbUix5xjbAYNSyOrnjb"
  "slim" => array:1 [▼
    0 => "{"server":null,"meta":null,"input":{"name":"butterfly-wallpaper.jpeg","type":"image/jpeg","size":1584719,"width":2560,"height":1600},"output":{"width":240,"height":240,"image":"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQ.....

cschoeni left a reply on Larave 5.2 - File Upload Not Work

array:2 [▼
  "_token" => "Gi3Uip2kiwWaEM3QojNg2AbUix5xjbAYNSyOrnjb"
  "slim" => "{"server":null,"meta":null,"input":{"name":"butterfly-wallpaper.jpeg","type":"image/jpeg","size":1584719,"width":2560,"height":1600},"output":{"width":240,"height":240,"image":"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/2wBDAQMDAwQDBAgEBAgQCwkLEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAARCADwAPADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NX
02 Aug
2 years ago

cschoeni left a reply on Larave 5.2 - File Upload Not Work

Hello @d3xt3r

I updated my Form header.

<form action="/artist/photo/upload" files=true enctype="multipart/form-data"  method="post">

But even with the entry I receive "null"

cschoeni started a new conversation Larave 5.2 - File Upload Not Work

When i upload a file. Give my with the dd($request->file('slim')); only null.

My Form

'''

{!! Form::token() !!} Abbrechen Speichern '''

My Controller

''' public function store(Request $request) { dd($request->file('slim')); } '''

My route

''' Route::post('/photo/upload', ['as' => 'store', 'uses' => 'Artist\[email protected]']); '''

The upload form I bought on http://preview.codecanyon.net/item/slim-image-upload-and-ratio-cropping-plugin/full_screen_preview/16364167?_ga=1.109654277.1615792691.1470001455

15 Jul
2 years ago

cschoeni left a reply on Sign Up And Subscribe New User In One Way

Hello @EventFellows

Yes the auth it works but i will in the way to register also the payment function. But in the AuthController Class in the method register don't fire my Event for the Payment Event.

cschoeni started a new conversation Sign Up And Subscribe New User In One Way

Hello everybody I have the register form on http://example.com/register. In this form i have the normal user Register Fields and the subscription fields. I will the subscribe and register in one Way.

With the Event in the AuthController after the user create don't work.

My Questions How i can Fire Event in the AuthController with the request parameter from the Register Form? How i can subscribe the user ($user->newSubscription) direct after the create user in the AuthController or give a other Way with the $data parameter?

Thanks for your Help Christoph

13 Jul
2 years ago

cschoeni left a reply on Laravel Cashier (Billing)

Thanks @martinbean, now it works.

cschoeni started a new conversation Laravel Cashier (Billing)

Hello everybody I have a problem with Laravel Cashier. Here's what I've done

  1. I Installed laravel/cashier with composer require (controll in composer.json file its installed)
  2. I updated my composer file
  3. I registred Laravel\Cashier\CashierServiceProvider in my config file.
  4. I Copyied all of migration in my users_table an migrate that
  5. I setup my Model with "use Laravel\Cashier\Billable;" and with "use Billable;" in my User Class
  6. I copy the empedet Form from Stripe and paste that in my test page

My Problem: When i write the Code like this in the documentation

$user = Auth::id(); $user->newSubscription('main', 'monthly')->create($creditCardToken);

But with this code became a failre Call to a member function newSubscription() on integer

I can change the variable creditCardToken with the _token, but its not work. What i make false?

I hope you can Help my

Best regards Christoph

26 Apr
3 years ago

cschoeni left a reply on Ln -s /path/to/storage/app/public /path/to/public/storage

Try this ln -s ~/Code/yardsales/storage/app/public ~/Code/yardsales/public/storage

cschoeni left a reply on Ln -s /path/to/storage/app/public /path/to/public/storage

Yeaaaaa, now it works

vagrant@homestead:~/Code/bee/storage/app/public$ ln -s ~/Code/bee/storage/app/public ~/Code/bee/public/storage

Thanks for your Help

cschoeni left a reply on Ln -s /path/to/storage/app/public /path/to/public/storage

Hello invisibleink

Thanks for your Message and Help. I work with Homestead. In this is my Spark Project in "~/Code/bee".

With this command, I get no error message: vagrant@homestead:~/Code/bee/storage/app/public$ ln -s ~/Code/bee/public/ ~/Code/bee/storage/app/public

Greeting Christoph

25 Apr
3 years ago

cschoeni started a new conversation Ln -s /path/to/storage/app/public /path/to/public/storage

Hello everybody I have a Problem with Path Information in the Spark Documentation. This command "ln -s /path/to/storage/app/public /path/to/public/storage" don't work.

Tanks for help Christoph

cschoeni left a reply on Registering Spark API Token

Hy jaahvicky I found a method. "I installed the installer globally like I do for laravel installer and had no issues"

  1. composer global require laravel/spark-installer
  2. spark register [Here your API KEY]
  3. Then press Enter...

Now it works

Source: https://laracasts.com/discuss/channels/spark/spark-register-seems-not-to-work-for-me

cschoeni left a reply on Registering Spark API Token

I have the same problem on mac os x and on my homestead. I send a email to taylor. i hope i became a feedback in the next hours...

09 Apr
3 years ago

cschoeni left a reply on List Array From Pivot Table

/**
* The roles that belong to the user.
*/
public function languageList()
{
return $this->belongsToMany('App\Language')->withTimestamps()->lists('language_id');
}

With this works grade. But its not so ncie.

cschoeni left a reply on List Array From Pivot Table

in my Controller: $languages = Language::all(); $data = [1,2,3,4,5,6]; (And this work, now i test this with your answer)

in my Blade

@foreach ($languages as $language) @endforeach /.checkbox -->

cschoeni started a new conversation List Array From Pivot Table

How i can create create a array with user_id or other id from my pivot table (Many to Many relationship). The result must by $value = [1,2,5,7,8];

this is for my multiple checkboxes. With if function give the checkbox value true or false...

12 Feb
3 years ago

cschoeni started a new conversation Outsourcing Code From Controller

Hello Together I want to restore the index in my controller. How can I share the code outsource?

Thanks for your help Christoph

08 Nov
3 years ago

cschoeni left a reply on ACL Laravel

Thanks @bobbybouwmann for your feedback.

cschoeni started a new conversation ACL Laravel

Hello guys I'm searching for a long time a laravel ACL. All ACL that i found was not only written with Bootstrap.

After that I started my self project. But it is difficult. If anyone is interested, put it this on github.

I have following questions:

  1. I will installing the project for laracast (https://github.com/laracasts/laravel-5-roles-and-permissions-demo) but i become a failure. What am I doing wrong?

This is my result; QueryException in Connection.php line 636: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'acl.permissions' doesn't exist (SQL: select * from permissions)

  1. Do you know a good project with ACL groups and permissions that was exclusively written with Bootstrap. (That didn't have a special theme for admin)

PS. sorry for my English. I try my best.

26 Oct
3 years ago

cschoeni left a reply on Problem With Selected Forms In Edit View

Thanks @bobbybouwmann for your help and your its works. I forget by the variable $group->permissions->lists('name', 'id') the 'name' value.

When i make a test with $group->permissions->lists('id') give also the value [0,1] but he can't selected the options into the select form.

But now it works.

Thank's for your help

cschoeni started a new conversation Problem With Selected Forms In Edit View

Hello Guys I have in my CRUD a problem. All Fields give output the value from DB. But not the multiple selected forms.

Groups Edit Controller: public function edit($id) { $group = Group::findOrFail($id); $permissions = Permission::lists('name', 'id');

    return view ('admin.groups.edit', compact('group', 'permissions', 'test'));
}

Edit Page: {!! Form::model($group, ['method' => 'PATCH', 'class' => 'form-horizontal', 'action' => ['GroupController@update', $group->id]]) !!} @include('admin.groups.form', ['btnName' => 'Update']) {!! Form::close() !!}

Form:

{!! Form::label('permission_list', 'Permissions', ['class' => 'col-sm-2 control-label']) !!} {!! Form::select('permission_list[]', $permissions, null, ['class' => 'form-control', 'multiple'=>'multiple', 'id' => 'permissions']) !!}