webcodecs

webcodecs

Member Since 4 Years Ago

Hamburg

Web developer at Hamburg, Germany

Experience Points 13,635
Experience Level 3

1,365 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 143
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.

12 Sep
1 year ago

webcodecs left a reply on Delaying Jobs

@bashy for now i only have one queue. But thanks for the tip! thread closed

webcodecs left a reply on Delaying Jobs

@bashy With redis its working fine. It does not solve the problem but working with redis is more fun anyway ;)

webcodecs left a reply on Delaying Jobs

I will test it with redis today and will give my feedback

08 Sep
1 year ago

webcodecs left a reply on Delaying Jobs

Okay, the Timezone is now correct but this does not did the trick. the db table is still empty :(

webcodecs left a reply on Delaying Jobs

no my time is 2 hours later. i will try to set my timezone correctly

webcodecs left a reply on Delaying Jobs

The carbon line gives me the following:

Carbon {#267
  +"date": "2017-09-08 11:04:11.313592"
  +"timezone_type": 3
  +"timezone": "UTC"
}```

webcodecs left a reply on Delaying Jobs

Yes i executed the migrations and the table is there but always empty

webcodecs started a new conversation Delaying Jobs

Hey guys i want to delaying a job within my Controller. I migrated the jobs table on my sqlite connection and configured the queue driver to database. But no job was stored in the database. what am i doing wrong?

env

DB_CONNECTION=sqlite
QUEUE_DRIVER=database

queue conf

'database' => [
            'driver' => 'database',
            'connection' => 'sqlite',
            'table' => 'jobs',
            'queue' => 'default',
            'retry_after' => 90,
        ],

Controller

public function rotate()
    {
        OrderAndRegisterCerts::dispatch()->delay(Carbon::now()->addMinutes(3));
        return DomainHandler::rotate();
    }

Job

<?php

namespace App\Jobs;

use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;

class OrderAndRegisterCerts implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    /**
     * Create a new job instance.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }

    /**
     * Execute the job.
     *
     * @return void
     */
    public function handle()
    {
        $a = 1+2;
        echo $a;
    }
}
10 Apr
2 years ago

webcodecs left a reply on Using Factory In PHPUnit Provider Fails

here is the definition of the userfactory:

$factory->define(App\Models\User::class, function (Faker\Generator $faker) {

    return [
        'first_name' => $faker->firstNameMale(),
        'last_name' => $faker->lastName(),
        'gender' => 'male',
        'birthday' => '04/29/1900',
        'email' => $faker->unique()->safeEmail,
        'provider_user_id' => $faker->randomNumber(5),
        'provider_name' => 'facebook',
        'avatar' => $faker->imageUrl(),
        'remember_token' => str_random(10)
    ];

Why are u asking and what are u thinking about?

06 Apr
2 years ago

webcodecs started a new conversation Using Factory In PHPUnit Provider Fails

Hey guys, i try to use a factory to makeusers in a provider. If i use the factory in the test directly, there was no problem. If i try to use it in a testing provider i get an error message:

The data provider specified for Tests\Unit\Model\UserTests::createAnUserInDBAsExpected is invalid.
Unable to locate factory with name [default] [App\Models\User].

This is my call to the factory:

factory(\App\Models\User::class)->make();

Does anyone has an idea?

Best regards

19 Jan
2 years ago

webcodecs left a reply on Cross Orgin Request Blocked

u can mark this answer as correct @velmurugan ;)

webcodecs left a reply on Cross Orgin Request Blocked

You can create a middleware which sets this header

$response->headers->set('Access-Control-Allow-Origin', 'http://example.com');

webcodecs started a new conversation Filter Tasks For Gulp Watch

Hey guys, i want to use gulp watch. But i need to filter one task to not being executing during the watch. i cant find any documentation on laravel.com. What i have to do?

Thanks in advance webcodecs

17 Oct
2 years ago

webcodecs left a reply on Overriding Package Route

Generally its wrong. The Comments in the app.php mention, that you define your package ServiceProviders after the App Providers. Within the AppProviders are the RoutingServiceProvider. That means that the App-Routes were loaded before the package routes. if you load your Package ServiceProviders before the RoutingServiceProvider, your are able to override the Package routes within your Http/routes.php.

But its not recommended.

14 Oct
2 years ago

webcodecs started a new conversation Overriding Package Route

Hey guys, I want to override a method in a package controller. The problem is that the Controller is called by a package route file. Can i override one special route of a package and if i can how i should do this?

Thanks in advandce webcodecs

23 Sep
2 years ago

webcodecs left a reply on JSON Response With Custom Header

This question is answered correctly but i wonder how to get the header in this response? Can you give me an advice please?

13 Sep
2 years ago

webcodecs left a reply on Migrations With Foreign Constraints

The following lines are the error output of the database

referenced columns appear as the first columns, or column types
in the table and the referenced table do not match for constraint.
Note that the internal storage type of ENUM and SET changed in
tables created with >= InnoDB-4.1.12, and such columns in old tables
cannot be referenced by such columns in new tables.Cannot find an index in the referenced table where the
referenced columns appear as the first columns, or column types
in the table and the referenced table do not match for constraint.
Note that the internal storage type of ENUM and SET changed in
tables created with >= InnoDB-4.1.12, and such columns in old tables
cannot be referenced by such columns in new tables.```

webcodecs left a reply on Migrations With Foreign Constraints

@tomi still the same error.

webcodecs started a new conversation Migrations With Foreign Constraints

Hey guys i want to execute migrations with foreign constraints. But i simply get the same error every time. First and second migration are the standard user table migrations. The third migration creates a new table called associations:

<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAssociationsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('associations', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->unique();
            $table->string('author');
            $table->timestamps();

            $table->foreign('user_id')
                  ->references('id')
                  ->on('users');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('associations');
    }
}

The fourth migration extends the user table with the column association_id and adds a foreign key constraint to the association table. But i get the following error:

 [Illuminate\Database\QueryException]                                                                                                                                                                      
  SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint (SQL: alter table `associations` add constraint `associations_user_id_foreign` foreign key (`user_id`) references `users` (`id`))   
                                                                          
  [PDOException]                                                          
  SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint  

i hope somebody can help.

best regards

12 Sep
2 years ago

webcodecs left a reply on Need Your Feedback On Antares - Open Source?

@konradkeck if i start a project where i need this approach i definitly would try it.

05 Sep
2 years ago

webcodecs left a reply on Need Your Feedback On Antares - Open Source?

I think this project could be vey usefull for a many developer. I would appreciate to go forword with this project ;)

12 Apr
3 years ago

webcodecs left a reply on Version Task With Watch

That was not the soloution. The problem was the .removetask. The version task could not find the files to version. I removed the .removeand it works as expected.

webcodecs started a new conversation Version Task With Watch

Hey guys, i use the version task in my gulpfile. Now i want to execute the watch command. The file that was changed will be compiled(SASS). But the version task wont execute. What am i doing wrong? To run watch i simply execute gulp watch in the terminal.

elixir(function (mix) {
    mix.task('clean')
        .sass(['app.scss', 'listing.scss', 'filter.scss', 'header.scss'])
        .scripts([
            paths.jquery + 'jquery.js',
            paths.bootstrap + 'javascripts/bootstrap.js'
        ], 'public/js/vendor.js')
        .scripts(['modules/filter.js', 'app.js'], 'public/js/app.js')
        .copy('resource/images', 'public/images')
        .copy(paths.bootstrap + 'fonts/bootstrap/**', 'public/fonts/bootstrap');
        mix.version([
            'public/js/vendor.js',
            'public/js/app.js',
            'public/css/app.css',
        ])
        .remove(['public/css', 'public/js']);
});
10 Mar
3 years ago

webcodecs left a reply on Set Cache Driver Via Nginx

I found a souloution. i can create a cache.php in the config dir and change the default to $_SERVER['CACHE_DRIVER']

webcodecs started a new conversation Set Cache Driver Via Nginx

Hey guys, i want to set the cache driver via nginx fastcgi params. But i dont know how to to it. Im using Lumen.

Thanks in advance

12 Feb
3 years ago

webcodecs started a new conversation List Of All Important Env Variables

Hey guys, i need a list of all important env variables in Laravel.

For my tests i need a redis db and want to use a different connection. in my phpunit XML i defined

<php>
        <env name="APP_ENV" value="testing"/>
        <env name="DB_CONNECTION" value="pgsql_testing"/>
        <env name="REDIS_CONNECTION" value="testing"/>
    </php>

The "switch" for the database connection works. But the "switch" for the redis connection doesnt.

Thanks in advandce

04 Feb
3 years ago

webcodecs left a reply on Return Asset From Route

My soloution is to get the content with file_get_contents' and set the correct content-type toapplication/javascript` Thanks for your help and pointing in the right direction.

webcodecs left a reply on Return Asset From Route

@bobbybouwmann But its a real file. Ok nex eplanation try

my public directory:

  • public
    • js
      • a.js
      • b.js
    • css
      • x.css
      • y.css

I want to display a.js. If i open the url http://example.com/js/a.js, the file will be displayed. I want to display the file with the url http://example.com/js/v2/a.js too. Without redirecting

webcodecs left a reply on Return Asset From Route

return \Response::make($content, '200')->header('Content-Type', 'plain/txt');

In this case i wonder what content is and where it comes from?

19 Jan
3 years ago

webcodecs left a reply on Add Interface Via Composer

I want to install a package, which only delivers an interface to use. And i wonder how to go for this.

webcodecs started a new conversation Add Interface Via Composer

HEy guys,

is it possible to write a package only with an interface and install it via composer?

How should the serviceprovider of this package look like?

Thanks in advance

18 Jan
3 years ago

webcodecs left a reply on Missing GET Params In Request

@lemmy thats what i mean with its no laravel problem ;)

webcodecs left a reply on Missing GET Params In Request

--------+----------+------------------------------+----------------------+---------------------------------------------------------------+------------+
| Domain | Method   | URI                          | Name                 | Action                                                        | Middleware |
+--------+----------+------------------------------+----------------------+---------------------------------------------------------------+------------+
|        | GET|HEAD | _debugbar/assets/javascript  | debugbar.assets.js   | Barryvdh\Debugbar\Controllers\AssetController@js              |            |
|        | GET|HEAD | _debugbar/assets/stylesheets | debugbar.assets.css  | Barryvdh\Debugbar\Controllers\AssetController@css             |            |
|        | GET|HEAD | _debugbar/clockwork/{id}     | debugbar.clockwork   | Barryvdh\Debugbar\Controllers\OpenHandlerController@clockwork |            |
|        | GET|HEAD | _debugbar/open               | debugbar.openhandler | Barryvdh\Debugbar\Controllers\OpenHandlerController@handle    |            |
|        | GET|HEAD | conf                         |                      | App\Http\Controllers\WidgetController@config                  | web        |
|        | GET|HEAD | info                         |                      | Closure                                                       |            |
|        | GET|HEAD | products                     |                      | App\Http\Controllers\WidgetController@products                | web        |```

webcodecs left a reply on Missing GET Params In Request

@bashy This was the weird autocompletion from chrome and firefox.

The problem only exist with the path '/config'. If i change the name to whatever all things are working like expected.

webcodecs left a reply on Missing GET Params In Request

@lemmy parameterbag is still empty. its not a laravel problem i think because the $_SERVER['QUERY_STRING'] is empty so laravel cant do anything.

but thanks for the help.

webcodecs left a reply on Missing GET Params In Request

i added a route for '/' with a closure to dd($_SERVER). This route uses the same middleware as my original route. But with with '/' route i can see the query string ...

webcodecs left a reply on Missing GET Params In Request

The Browers always adds the slash after config.

i use a middleware to adjust the cors header. And the middlewares by laravel.

webcodecs left a reply on Missing GET Params In Request

I dont want to use parameters because the order with parameters is important. i want to ignore the order of the parameters.

the QUERY_STRINGin $_SERVER is empty too.

webcodecs started a new conversation Missing GET Params In Request

Hey guys, its very weird. I have a simple route for http://example.com/config/?param1=x&param2=y

my route looks like Route::get('/config', 'ExampleController@config');

In my example controller i jusst dd($request) after dependencie injection

public function config(Request $request)
    {
dd($request);
}

but my parameterBag where the GET params should be is empty. Someone had a similiar problem?

Thanks in advance.

15 Jan
3 years ago

webcodecs started a new conversation Caching Config With Redis

Hey guys,

i want to use a redis cache. I changed the CACHE_DRIVER=redisin my env file. Now i want to put my config in the redis storage using Cache::put('config', ['some' => 'values'], 10) but if i enter the redis cli and get all keys with keys *its empty. Is it even possible to store an array via Cache::put to redis?

Thanks in advandce

webcodecs left a reply on Class Log Does Not Exist

For me it was a error in custom config.

webcodecs left a reply on Return Asset From Route

Thank you.

webcodecs left a reply on Return Asset From Route

And how i can append the file to the response?

webcodecs started a new conversation Return Asset From Route

Hey guys, is it possible to directly return an asset like a js-file from a route.

for example my js-file is stored under `public/js/whatever/abc.js

But i want to return ths file with the url `http://mydomain.com/xy/abc.js

I hope you know what i mean.

Thanks in advandce!

21 Dec
3 years ago

webcodecs left a reply on Own Configuration File

Maybe thats the reason why i cant find the ConfigServiceProvider. Thanks for your help. it is working!

webcodecs started a new conversation Own Configuration File

I want to add an additional configuration file for my app. But i dont know how to load it. I read something about a ConfigServiceProvider but im not sure there is one. What i have to do to add a config file, load it and access it.

THanks in advannce.

18 Dec
3 years ago

webcodecs left a reply on Package Namespace Not Available

Damn thats so embarassing. Thanks. I was so nervous i just updated.... facepalm

webcodecs started a new conversation Package Namespace Not Available

Hey guys, i developed a own L5 package. I developed it on a fresh L5 installation and it works perfectly. I added the package to my github and want to install it on another project via composer. The cloning of the repository is succesfull and the files are at the correct place under vendor/myname/project.

I added the PackageServiceProvider to my config/app.php. But L5 cant find the namespace. only if i define the package namespace in root composer.json my package works.

Does anyone has kind of an idea?

Best regards