mazinoukah

mazinoukah

Member Since 2 Years Ago

Oleh

Web Developer at Packet Clouds Technology

Experience Points 13,620
Experience Level 3

1,380 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 124
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 Aug
1 year ago

mazinoukah started a new conversation Lock Wait Timeout Exceeded; Try Restarting Transaction

please how can i solve this problem i have been having since morning ?

SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction (SQL: insert into jobs (queue, payload, attempts, reserved_at, available_at, created_at) values (default, {"displayName":"App\Listeners\UpdateReadersFeed","job":"Illuminate\Queue\[email protected]","maxTries":null,"timeout":null,"data":{"commandName":"Illuminate\Events\CallQueuedListener","command":"O:36:"Illuminate\Events\CallQueuedListener":6:{s:5:"class";s:31:"App\Listeners\UpdateReadersFeed";s:6:"method";s:6:"handle";s:4:"data";a:1:{i:0;O:25:"App\Events\EpisodeCreated":2:{s:8:"activity";O:45:"Illuminate\Contracts\Database\ModelIdentifier":2:{s:5:"class";s:12:"App\Activity";s:2:"id";i:6;}s:6:"socket";N;}}s:5:"tries";N;s:7:"timeout";N;s:6:"\u0000*\u0000job";N;}"}}, 0, , 1502722707, 1502722707))

03 Aug
1 year ago

mazinoukah started a new conversation Best Way To Handle Images Upload When Creating A Post

i am building a little social site, currently i am having issues with the image upload section. i want the user to be able to optionally upload an image while creating a post, right now i am loading the images to the browser as base64 strings then when the user hits post, i use ajax to send the post and the image string to the server, then convert the image back to jpeg. it seemed to be working well for small images but when large images are "attached " to the browser for submission to the server, i begin to notice a drastic drop in the browser performance ( due the large image size). okay so my question is what better options do i have to implement this functionality. if i want to go with the option of uploading the image to the server through ajax immediately the user adds it, how do i handle situations when the user did not complete writing the post and submit it ?

31 Jul
1 year ago

mazinoukah started a new conversation Working With Laravel-echo And Socketio

my first question: is it okay to fire of an event from within a listener ?

my second question : if it is not okay how do i broadcast data from my listener to the client side ?

please i'm asking these questions because i am really confused, on a project i am working on... i have been using the sync queue driver, and also firing events from a listener in other to broadcast the data to the frontend with laravel-echo-server.... everything seeemed to be working fine until i decided to queue the listener using the database driver...... i then discovered laravel-echo returns the current data that was broadcast together with previous broadcast data

11 Jul
1 year ago

mazinoukah left a reply on List Of All Important Env Variables

@lostdreamer_nl i tried your solution but its not working for me, i'm using laravel 5.4

21 Jun
1 year ago

mazinoukah started a new conversation SQLSTATE[42S01]: Base Table Or View Already Exists: 1050 Table 'stories' Already Exist For Sqlite In Memory Test Phpunit

I am using sqlite for my phpunit testing (in memory), it was all working well untill recently i started receiving this error "SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'stories' already exist"

18 Jun
1 year ago

mazinoukah left a reply on NotFoundHttpException In RouteCollection.php Line 161:

i have tried that...did'nt work either

17 Jun
1 year ago

mazinoukah started a new conversation NotFoundHttpException In RouteCollection.php Line 161:

thisissue is driving me crazy right now... i just installed a fresh install of laravel...after running php artisan make:auth nothing in my route/web web file works again i keep getting the error :

NotFoundHttpException in RouteCollection.php line 161:

my route/web.php

             Route::get('/', function () {
                     return view('welcome');
              });

              Route::get('/d', function () {
                        return view('welcome');
                 });


                Auth::routes();

           Route::get('/home', '[email protected]');

on running php artisan route:list

                                                     +--------+----------+------------------------+------------------+------------------------------------------------------------------------+--------------+

| Domain | Method | URI | Name | Action | Middleware | +--------+----------+------------------------+------------------+------------------------------------------------------------------------+--------------+ | | GET|HEAD | / | | Closure | web | | | GET|HEAD | api/user | | Closure | api,auth:api | | | GET|HEAD | d | | Closure | web | | | GET|HEAD | home | | App\Http\Controllers\[email protected] | web,auth | | | GET|HEAD | login | login | App\Http\Controllers\Auth\[email protected] | web,guest | | | POST | login | | App\Http\Controllers\Auth\[email protected] | web,guest | | | POST | logout | logout | App\Http\Controllers\Auth\[email protected] | web | | | POST | password/email | password.email | App\Http\Controllers\Auth\[email protected] | web,guest | | | GET|HEAD | password/reset | password.request | App\Http\Controllers\Auth\[email protected] | web,guest | | | POST | password/reset | | App\Http\Controllers\Auth\[email protected] | web,guest | | | GET|HEAD | password/reset/{token} | password.reset | App\Http\Controllers\Auth\[email protected] | web,guest | | | GET|HEAD | register | register | App\Http\Controllers\Auth\[email protected] | web,guest | | | POST | register | | App\Http\Controllers\Auth\[email protected] | web,guest | +--------+----------+------------------------+------------------+------------------------------------------------------------------------+--------------+

i have tried running php artisan clear-compiled php artisan cache-clear php artisan view-clear php artisan config-clear

yet a get request to /d still returns that error, though request to '/' works but '/login' and '/register' do not

14 Jun
1 year ago

mazinoukah left a reply on 422 (Unprocessable Entity) In Laravel With Vuejs

@kerranm thanks for posting this here !!! it worked for me :)

02 Jun
1 year ago

mazinoukah left a reply on Why Is My App.js Compiled File So Big ?

@marthz i am using webpack for laravel elixir , laravel 5.3

mazinoukah started a new conversation Why Is My App.js Compiled File So Big ?

i just finally completed a project, i have been working on using vue , laravel and elixir, but after running "gulp --production" the file size is about 600kb. what have i done wrong or what did i do wrong ? these are all the components i am using :

        require('./bootstrap');
      import moment from 'moment' ;
    import analyticsgraph from './components/home/analyticsgraph.vue' ;
    import ParrallelMarketRates from './components/home/ParallelMarketRates.vue';
    import Rates from './components/home/Rates.vue';
    import BankRates from './components/home/BankRates.vue';
    import RatesCalculator from './components/home/RatesCalculator.vue';
     import News from './components/home/News.vue';
     import {url} from './components/utilities/settings';
     import { default as swal } from 'sweetalert2'

    Vue.component('analyticsgraph', analyticsgraph);
    Vue.component('parrallelmarketrates', ParrallelMarketRates);
     Vue.component('WesternUnion', Rates);
       Vue.component('Cbn', Rates);
      Vue.component('Bdc', Rates);
        Vue.component('BankRates', BankRates);
        Vue.component('RatesCalculator', RatesCalculator);
       Vue.component('news', News);
01 Jun
1 year ago

mazinoukah started a new conversation Cant Run Npm Install On A Fresh Version Of Laravel Windows 10

here's what i have done :

  1. installed node v8
  2. installed visual studio 2015 and c++
  3. install python 2.7
  4. npm config set msvs_version 2015

but for 12 hours now i keep having all sorts of errors . the latest one is :

        PS C:\xampp\htdocs\lasgidifx.com> npm install

[email protected] install C:\xampp\htdocs\lasgidifx.com\node_modules\node-sass node scripts/install.js

module.js:487 throw err; ^

Error: Cannot find module 'request' at Function.Module._resolveFilename (module.js:485:15) at Function.Module._load (module.js:437:25) at Module.require (module.js:513:17) at require (internal/module.js:11:18) at Object. (C:\xampp\htdocs\lasgidifx.com\node_modules\node-sass\scripts\install.js:10:13) at Module._compile (module.js:569:30) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:503:32) at tryModuleLoad (module.js:466:12) at Function.Module._load (module.js:458:3) npm WARN saveError ENOENT: no such file or directory, open 'C:\xampp\htdocs\lasgidifx.com\package.json' npm WARN enoent ENOENT: no such file or directory, open 'C:\xampp\htdocs\lasgidifx.com\package.json' npm WARN lasgidifx.com No description npm WARN lasgidifx.com No repository field. npm WARN lasgidifx.com No README data npm WARN lasgidifx.com No license field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]https://registry.npmjs.org/node-sass/-/node-sass-3.13.1.tgz (n ode_modules\node-sass): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: node scripts/install.js npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

added 7 packages and updated 259 packages in 174.806s

i am so fustrated !!!!

30 May
1 year ago

mazinoukah left a reply on Designing An Activity Feed And Fetching Results From It

i am trying to implement something similar, however i have issues. If i have to loop through 5000 or 50000 followers of a user/users in order to update their feeds, it would definitely take a long time and i would not want the user to wait while this happens, so i would want to use laravel queues right ? okay right, what if 100 or 10000 people post a status or comment on a post or infact just create some sort of activity at about the same time ? the queue becomes very long and if they all have lots of followers it could take hours before the last persons activity is pushed to all his followers.

i am really confused about how to implement this stuff, any help would be deeply appreciated. thanks @sid405 @ohffs @spoon

12 May
1 year ago

mazinoukah started a new conversation How To Create Custom Table Row Components In Vue

i am trying to create a custom table row element so that i can manage the state and properties such as 'editing'

i tried to create an inline component like so :

                        <news-items inline-template>
                                      <tr class="gradeX" >
                                          <td><input type="checkbox" /></td>
                                          <td>title</td>
                                          <td>description</td>
                                       </tr>
                                          

                                  </news-items>

but i keep getting error that there can be only one root element

i found someone with similar issue on github https://github.com/vuejs/Discussion/issues/204

but i dont understand how to implement it. please how can i achieve this ?

04 May
1 year ago

mazinoukah started a new conversation What Is The Most Efficient Way Of Creating A Feeds System With Node, Redis And Socket.io

I am trying to create an activity feed for each user in my application. i want to use redis to store two sets per user. 1 for storing the ids of his followers and 2 for storing the ids of the activities from every user he is following(his feeds).

so what i want to do is when a user as a post/creates an activity i want to push the id of that post/created activity to the the list of every user whose id is in the set containing the users followers.

i am assuming i would have to loop through the 'followers set' and for each one, add the post/activity id to each of the followers 'feed set', and emit an event with socket.io for that user( newfeedevent ) . i noticed that if about 10 or 20 people having about 100000 followers should create an activity about the same time, it would take about 6 minutes or more to update each of the feeds of the followers of the 10th or 20th person.

i want to believe there is a more efficient and faster way of doing this, especially if the 'followers set' contains 1000000 records.

e.g

// to add followers to user with id of 1

sadd user.1.followers 4 90 3 48 8 2 45

//to add an activity with id 200 to user 1 feed

sadd user.1.feeds 200

// to get all user with id 1 followers

smemebers user.1.followers

//to get the feed of user 1

smembers user.1.feeds

21 Apr
2 years ago

mazinoukah left a reply on How To Create Different Types Of Users Using Eloquent

@thoasty Thanks for your reply, i thought about this, but then i would have so many fields with null as value , if the flag is set to "standarduser" . fields such as businessname , officeaddress, websitelink etc that are unique to a "professional" would be set to null

mazinoukah started a new conversation How To Create Different Types Of Users Using Eloquent

i am trying to create an application which has two different types of users : 'professional' and 'standarduser'. i decided to use a polymorphic relationship as they both have some fields in common however i am anticipating some fields would be unique to each of them.

i also want to allow a 'standarduser' account to be upgraded to a 'professional' account and vice versa. currently i am using the 'user_id' on each of the tables('professional' , 'standarduser') to keep track of the user that they belong to , so that when for example, a user is downgraded from 'professional' to 'standarduser' i'ld just check to see if he already had a 'standarduser' account before and use that instead of creating a new row in that table.

i don't know if this is the right way to go about something like this, if this is not the right way, please how can i achieve this ?

Tables structure Users

id - AI password - string email - string username -string userable_id - integer userable_type - string created_at - datetime updated_at - datetime professional

id - AI businessname - string officeaddress - string websitelink - string user_id - integer standarduser

id - AI company_name - string user_id - integer Professsional Model

public function user() { return $this->morphOne('User', 'userable'); } Standarduser Model

public function user() { return $this->morphOne('User', 'userable'); }

03 Mar
2 years ago

mazinoukah left a reply on Laravel Passport "unauthenticated" Error

i ve tried everything here but its not working still

31 Jan
2 years ago

mazinoukah left a reply on Permanent Failure When Sending Mail With Mailgun

I found the solution to the problem, I changed the sender email from '[email protected]' :

\Mail::send($view ,$data,function($message) use($user, $subject, $email){
          $message->from('[email protected]','witskids');
          $message->to($email, $user->firstname );
          $message->subject( $subject);
    });

To my domain :

\Mail::send($view ,$data,function($message) use($user, $subject, $email){ $message->from('[email protected]','witskids'); $message->to($email, $user->firstname ); $message->subject( $subject); });

26 Jan
2 years ago

mazinoukah started a new conversation Permanent Failure When Sending Mail With Mailgun

I have a mailgun account I use to send mails on my site (domain.com) when someone signup, I then created another site on my subdomain (subdomainname.domain.com). However when I try to send mail from the subdomain site (subdomainname.domain.com) I get a permanent failure log in my mailgun account, and the email is not delivered. Please how can I solve this issue ? The mails sent from the main domain (domain.com) is delivered successfully. The errors I get are :

02:13 PM Failed: [email protected][email protected] 'Witskids:Activate Your Account' Server response: 550 550 5.7.0 (COL004-MC2F27) Unfortunately, messages from (209.61.151.224) on behalf of (yahoo.com) could not be delivered due to domain owner policy restrictions.

01/26/17 08:00 AM Failed: [email protected][email protected] 'Witskids:Activate Your Account' Server response: 550 550 5.7.1 Unauthenticated email from yahoo.com is not accepted due to domain's 5.7.1 DMARC policy. Please contact the administrator of yahoo.com domain if 5.7.1 this was a legitimate mail. Please visit 5.7.1 https://support.google.com/mail/answer/2451690 to learn about the 5.7.1 DMARC initiative. d72si348434oic.133 - gsmtp

01/25/17 02:02 PM Failed: [email protected][email protected] 'Witskids:Activate Your Account' Server response: 554 554 5.7.9 Message not accepted for policy reasons. See https://help.yahoo.com/kb/postmaster/SLN7253.html

mazinoukah left a reply on Can't Send Emails From Yahoo In Mailgun

@STAHA please did you find a solution to this Issue ? I also having similar issue...I get this error only when trying to send mail from my subdomain

24 Jan
2 years ago
23 Jan
2 years ago

mazinoukah started a new conversation How To Create An EBook Reader Site

What library or plugin can I use to create an eBook reader on my website for displaying formats such as pdf ?. I searched google but could only from find plugins for WordPress.

10 Jan
2 years ago

mazinoukah started a new conversation How Can I Install Laravel-mix In Laravel 5.3

I tried to install laravel-mix in laravel 5.3 but i keep getting errors :

    npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
    npm WARN notsup Not compatible with your operating system or architecture:          [email protected]
    npm WARN [email protected] requires a peer of [email protected] || ^2.1.0-beta but none was installed.
    npm WARN [email protected] requires a peer of [email protected]^2.1.0-beta.19 but none was installed.
    npm WARN [email protected] requires a peer of [email protected]^2.1.0-beta.26 but none was installed.

Pls how can i fix this ? i also removed laravel-elixir from my dependencies list

18 Dec
2 years ago

mazinoukah started a new conversation Cron Job Not Working

i am hosting my laravel application with namecheap, i have also followed all the instructions here https://www.namecheap.com/support/knowledgebase/article.aspx/9453/29/how-to-run-scripts-via-cron-jobs . however after setting my cron job in the cron job tab of cpanel, i get notifications in my email but the artisan command does'nt seem to be executed as my database remains the same. i tried to echo out a value in the artisan command's handle method for testing purposes but then nothing gets output and i still get notifications in my email like so => 'Running scheduled command: '/opt/alt/php70/usr/bin/php' 'artisan' deactivate:ads > '/home/agrodqkc/applications/agroexpresslink/app/console/log.txt' 2>&1 &'

This is my cron command for every minute => /usr/local/bin/php /home/agrodqkc/applications/agroexpresslink/artisan schedule:run

17 Nov
2 years ago

mazinoukah started a new conversation Columns With The Same Name Are Overidden In Eloquent Join

I have noticed that whenever i write a query using eloquent where i'm joining more than one tables together, columns having the same name seem to overidden and therefore the result set would have just one of these column. please how can i fix this ?

11 Nov
2 years ago

mazinoukah started a new conversation Authentication Not Working When Request Is Ajax

I transfered my site to a shared hosting server, but then i discovered that my ajax calls where not working anymore, it was giving me CORS errors so i updated my .htacess file with : Header set Access-Control-Allow-Origin "*" Header set Access-Control-Allow-Credentials true Header add Access-Control-Allow-Headers "origin, x-requested-with, content-type, X-Auth-Token, Authorization" Header add Access-Control-Allow-Methods "PUT, GET, POST, DELETE, OPTIONS" then that fix the CORS error but however in my controller method that is handling that request , i cant retrieve the logged in user. i have tried using Auth::id() and Request::user() but it keeps returning null . please how can i fix this ?

09 Nov
2 years ago

mazinoukah started a new conversation App Url Not Changing

i'm trying to change the default app url for my laravel application , i changed the APP_URL in the .env file to the name of my site url but its not working. The asset() function keeps returning http://localhost. please how can i make it work ?

08 Nov
2 years ago

mazinoukah left a reply on Creating Concrete Classes From Interface

i think i now understand to some extent whats going on, somewhere behind the scenes the Factory interface was 'bind' to the Factory class in the container. e.g with something like this App::bind('Illuminate\Contracts\Validation\Factory' , function(){ return new Illuminate\Validation\Factory(); }) so whenever we try to resolve the factory interface out of the container , we get a new instance of the factory class. though i can't still see where it was done

mazinoukah started a new conversation Creating Concrete Classes From Interface

I'm trying to understand how laravel works behind the scenes and how a controller uses the ValidatesRequests trait. but i dont understand how an instance of validator is created by using the factory interface by doing this app(Factory::class)->->make($request->all(), $rules, $messages, $customAttributes). Please i need explanation on this

01 Nov
2 years ago

mazinoukah left a reply on Clean Way To Inject Old Input

@Snapey Thanks i discovered it was not possible so i implemented what @willvincent suggested

30 Oct
2 years ago

mazinoukah left a reply on Clean Way To Inject Old Input

how do i handle the file input field when editing ?

23 Oct
2 years ago

mazinoukah left a reply on How To Create A Featured/Top Article In A Classifieds Php Application

@RachidLaasri The Top Ads section is for displaying "paid ads" (and there re different promo plans), if i should order it by most viewed , someone who paid for that feature might never find his ad at that Top ad section. i'm already using the order by most viewed for the section below that displays the free ads (ads without the featured plan).

mazinoukah started a new conversation How To Create A Featured/Top Article In A Classifieds Php Application

I'm creating a PHP classified ads application but i'm stuck on how to create the 'Top Ads/Featured Ads section' to be shown at every search page depending on the category. My first instinct was to create an sql query to randomize these 'Top ads' , Limit the result to 2 and display it on each search page. However its seems this is going to break quickly as i'm using " order by Rand() " in my query to randomize the result. Please how can i achieve this using a more practical approach ?

17 Oct
2 years ago

mazinoukah left a reply on Algolia Not Working

@ tomi its working now thanks

mazinoukah started a new conversation Algolia Not Working

Please i'm trying to learn how to use algolia but i'm getting this error "AlgoliaSearch\AlgoliaException with message 'Hosts unreachable: Could not resolve host: your-application-id-dsn.algolia.net,Could not resolve host: your-application-id-3.algolianet.com,Could not resolve host: your-a pplication-id-2.algolianet.com,Could not resolve host: your-application-id-1.algolianet.com' " . please ho w can i solve it ?

09 Oct
2 years ago

mazinoukah started a new conversation Calculation In Eloquent

pls how do i rewrite this query with eloquent :

SELECT p.id, p.title, p.time, p.views, COALESCE(sum(v.favorite) , 0 ) as favoritecount , ( (p.views + COALESCE(sum(v.favorite) , 0 ) ) ) as rank FROM posts p LEFT JOIN favorite v

on p.id = v.post_id

GROUP by p.id

order by rank desc