stefanX201

stefanX201

Member Since 5 Years Ago

Koblenz

Software Engineer at Dipl. Ing. (FH) Stefan Neuser

Experience Points 59,410
Experience Level 12

590 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 802
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.

08 Sep
1 week ago

stefanX201 started a new conversation How Laravel-Valet Knows Which Driver To Use?

Hi all, i asking my self how laravel valet knows which driver is should use? I understand how to write a driver with the SampleValetDriver.php but i can't find how Laravel Valet decide which driver is the correct one.

I'm trying to get shopware6 running with Laravel-Valet and i guess the Symfony-Driver is the correct one. This one gets shipping by laravel-valet out of the box.

Greetings from Germany,

Stefan

28 Jun
2 months ago

stefanX201 left a reply on SortBy And Accented Words

@FLORIANHUSQUINET -

Route::get('/sort', function() {
    setlocale(LC_COLLATE, 'fr_FR.utf8'); // No need to set this if you're doing it elsewhere

    $collection = collect([
        ["name"=>"maroon"],
        ["name"=>"zoo"],
        ["name"=>"ábel"],
        ["name"=>"élof"]
    ])->sortBy("name", SORT_LOCALE_STRING); // Signals to arsort() to take locale into 

    dd($collection->toArray());
});
array:4 [▼
  0 => array:1 [▼
    "name" => "maroon"
  ]
  1 => array:1 [▼
    "name" => "zoo"
  ]
  2 => array:1 [▼
    "name" => "ábel"
  ]
  3 => array:1 [▼
    "name" => "élof"
  ]
]

seems your example is not working

20 Apr
1 year ago

stefanX201 left a reply on Composer With --no-dev Flag

Go to settings->source-control and uncheck Install "Dev" Composer Dependencies

20 Apr
2 years ago

stefanX201 left a reply on Laravel-Mix Sourcemap Files Not Genarates

My mix process (version 0.10.0) doesnt create any source maps

mix.js('resources/assets/js/app.js', 'public/js/app.js')
    .js('resources/assets/js/ami.js', 'public/js/ami.js')
    .extract(['vue', 'axios', 'bootstrap-sass', 'jquery', 'vue-select'])
    .sass('resources/assets/sass/app.scss', 'public/css')
    .sass('resources/assets/sass/ami.scss', 'public/css')
    .sourceMaps()

any idea?

10 Apr
2 years ago

stefanX201 left a reply on Vuejs And Summernote

any idea to solve this with vuejs 2?

21 Dec
2 years ago

stefanX201 left a reply on Vue-resource Ajax Post Request From Domain -> Subdomain

If you are using Laravel then edit your session.php and set

domain' => ".domain.dev" // the domain.dev and all subdomains

Register a CORS Middleware since Laravel 5 it could look like

    <?php

    namespace App\Http\Middleware;
    
    use Closure;
    
    class Cors
    {
        public function handle($request, Closure $next)
        {
            if ($request->is('api/*')) {
                return $next($request)
                    ->header('Access-Control-Allow-Origin', 'http://subdomain.domain.dev')
                    ->header('Access-Control-Allow-Credentials', 'true')
                    ->header('Access-Control-Allow-Methods', 'GET, POST');
            }
            return $next($request);
        }
    }

if you using vue reseouce you need to set:

Vue.http.options.credentials = true;

With jquery the request should look like:

    $.ajax({
      type : "GET",
      url : 'http://domain.dev/api/users',
      async: false,
      xhrFields: {
        withCredentials: true
      },
      success : function(data, textStatus, xmLHttpRequest){
        console.log(data);
      }
    });
14 Sep
3 years ago

stefanX201 left a reply on Escape Html Characters With Vue.js

In Blade i use this {@{{ var }}}

stefanX201 left a reply on Equivalent Of {!! !!} In Vue JS

In Blade i use this:

{@{{ htmlContent }}}
20 Jul
3 years ago

stefanX201 left a reply on Http Controller Inheritance

you are right, only the type of 'warning' changes. thx for the hint & conversation.

stefanX201 left a reply on Http Controller Inheritance

No, in PHP5 this was possible see below example:

<?php

class BaseClass {
    function index() {}
}

class Test extends BaseClass {
    function index($param) {}
}

[email protected]:~$ php -v
PHP 5.5.9-1ubuntu4.14 (cli) (built: Oct 28 2015 01:34:46) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
[email protected]:~$ php test.php 
[email protected]:~$ 
php -v
PHP 7.0.8 (cli) (built: Jun 23 2016 16:32:40) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
╭─  ~/Desktop 
╰─$ php test.php
PHP Warning:  Declaration of Test::index($param) should be compatible with BaseClass::index() in /Users/stefan/Desktop/test.php on line 9

Warning: Declaration of Test::index($param) should be compatible with BaseClass::index() in /Users/stefan/Desktop/test.php on line 9

But you are right, in a real OOP world this should'nt work. PHP5 wasn't a real OOP world ;)

stefanX201 left a reply on Http Controller Inheritance

Is that new in PHP7? I remember in PHP5 this is possible?

stefanX201 started a new conversation Http Controller Inheritance

Does anybody has an idea why the inheritance below does not work? I guess there is some collision with reflection/symfony/DI magic?!?

ErrorException in CategoriesPostsController.php line 8:
Declaration of Cmsify\Controllers\CategoriesPostsController::index($categoryId) should be compatible with Cmsify\Controllers\PostsController::index()
class CategoriesPostsController extends PostsController
{

    /**
     * Display a listing of the resource.
     *
     * @param $categoryId
     * @return Response
     */
    public function index($categoryId)
    {
        return Post::whereHas('categories', function($q) use ($categoryId) {
            $q->where('category_id', $categoryId);
        })->get()->all();
    }
class PostsController extends Controller
{
    /**
     * Display a listing of the resource.
     *
     * @return Response
     */
    public function index()
    {
        return Post::get()->all();
    }
17 Jun
3 years ago

stefanX201 left a reply on Vuestrap Base Components Are Live Now!

@kzima please check all the PR's or think about hire some people who helps you manage the repo

02 Jun
3 years ago

stefanX201 left a reply on ParseError: Unexpected Token: <template>

@chrisreiduk I think that will solve the Problem for all npm version > 3.1 Users that stucks on the Issue :)

Thanks!

22 Nov
3 years ago

stefanX201 left a reply on Is Laracasts/Integrated End Of Life?

Here i fixed a issue with selectboxes and also make run selenium run with homestread and 5.1

https://github.com/laracasts/Integrated/issues/111

@Jeff : is it possible to work on that and maybe start a pullrequest ?

02 Jun
4 years ago
23 Apr
4 years ago

stefanX201 left a reply on Laravel 5 Testing Environment

i have the same issue. of facts like this i think laravel 4.2 is the better choice for a solid enviroment.

29 Sep
4 years ago

stefanX201 started a new conversation Table Constraints With No Action

Hi all,

i'm asking myself if it makes sense to define constraints with no action?

One Advantage is to be sure that all "virtual in mind" table references are working fine.

Another i think is for better understanding/documentation of the System. But otherwise if you name foreign keys like table_id this point is trivial.

What does the community think?

Have a good one!

24 Sep
4 years ago

stefanX201 started a new conversation Behat "I Should See" Doesnt Work

I should see doesnt work anytime. $this->assertPageContainsText works fine. Any Idea?

Here a little piece of Code as an example:

/**
 * @Given /I am logged in with the username "([^"]*)" and password "([^"]*)"/
 */
public function loginWithEmailAndPassword($username, $password)
{

        return [
        new Behat\Behat\Context\Step\Given("I am on \"/shop/login/create\"")
        new Behat\Behat\Context\Step\When("I fill in \"username\" with \"$username\"")
        new Behat\Behat\Context\Step\When("I fill in \"password\" with \"$password\"")
        new Behat\Behat\Context\Step\When("I press \"loginButton\"")
        new Behat\Behat\Context\Step\Then("I should see \"Logout\"")
       ];
}

UPDATE:

I solved it with this:

/**
 * @Given /I am logged in with the username "([^"]*)" and password "([^"]*)"/
 */
public function loginWithEmailAndPassword($username, $password)
{
    $this->visit('/shop/login/create');
    $this->fillField('username', $username);
    $this->fillField('password', $password);
    $this->pressButton('loginButton');
    $this->assertPageContainsText('Logout');
}

stefanX201 started a new conversation Behat "I Should See" Doesnt Work

I should see doesnt work anytime. $this->assertPageContainsText works fine. Any Idea?

Here a little piece of Code as an example:

/**
 * @Given /I am logged in with the username "([^"]*)" and password "([^"]*)"/
 */
public function loginWithEmailAndPassword($username, $password)
{

        return [
        new Behat\Behat\Context\Step\Given("I am on \"/shop/login/create\"")
        new Behat\Behat\Context\Step\When("I fill in \"username\" with \"$username\"")
        new Behat\Behat\Context\Step\When("I fill in \"password\" with \"$password\"")
        new Behat\Behat\Context\Step\When("I press \"loginButton\"")
        new Behat\Behat\Context\Step\Then("I should see \"Logout\"")
       ];
}

UPDATE:

I solved it with this:

/**
 * @Given /I am logged in with the username "([^"]*)" and password "([^"]*)"/
 */
public function loginWithEmailAndPassword($username, $password)
{
    $this->visit('/shop/login/create');
    $this->fillField('username', $username);
    $this->fillField('password', $password);
    $this->pressButton('loginButton');
    $this->assertPageContainsText('Logout');
}