Member Since 3 Years Ago

Experience Points 4,660
Experience Level 1

340 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 14
Best Reply Awards 0
Best Reply
  • 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


    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement


    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.

18 Feb
4 months ago

mkdesign82 started a new conversation Page Expiration - Laravel Dusk

Hi, I'm running laravel dusk on the gitlab CI, when I submitting the form this error show's to me. The page has expired due to inactivity please refresh and try again.

It's working pretty fine on my local but on the CI runner, the above error messages show's to me.

07 Feb
4 months ago

mkdesign82 started a new conversation Rule It's Not Working In Validation


I've used the below validation for some specific request

['required', 'regex:/^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$/', Rule::exists('parent_child_relation', 'qr_code')]

Then After I run artisan config:cache, Laravel throw's an error because of the wrong config cached file

 array (
          0 => 'required',
          1 => 'regex:/^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$/',
          2 => 
             'table' => 'parent_child_relation',
             'column' => 'qr_code',
             'wheres' => 
            array (

the error is as below

Uncaught ReflectionException: Class config does not exist in /laravel/framework/src/Illuminate/Container/Container.php:752

Anyone can help me with that?

24 Jan
4 months ago

mkdesign82 started a new conversation Swagger

Guys, I'm wondering if you know where Is the ref="#/definitions/Pcktchild" located?

22 Jan
4 months ago

mkdesign82 started a new conversation Add Custom Throttle


I want to add throttle to some of the API's but I want it to get work when the response was 422 or make the throttle work when the request was wrong. I mean the input fields are wrong. Is that possible?

20 Jan
4 months ago

mkdesign82 started a new conversation Run Dusk In Production Mode

Hi every one

Do you know why it's a danger to run dusk in production mode?

08 Jan
5 months ago

mkdesign82 left a reply on Cant Access The Catch Data In Controller Action

sorry for the spell, I mean cache.

07 Jan
5 months ago

mkdesign82 started a new conversation How To Expose The Array Cache In View->composer

hey guys

I'm wondering if you guys have had such situation, I want to cache some records and I'm using array driver for that but unfortunately I cant reach the cache store in my controller action, so do you guys have any idea what's the problem or what's that stopes the caching?

mkdesign82 started a new conversation Cant Access The Catch Data In Controller Action


I'm working on a project which it has a bunch of tests, now I'm having a problem running the test, in the app service provider I've cached some records from the database but I can't access the catch when I'm calling a URL.

        $language = (array) \GuzzleHttp\json_decode($this->get(url()->to('/').'/language/list')->getContent())->data;
        $this->assertEquals(array_keys($language), ['languages', 'top']);

guys do you have any idea?

13 Dec
6 months ago

mkdesign82 left a reply on Stop Phpunit Of Resetting The Database

then it'll trigger the factory method and create 10 records per each test but I don't need those 10 records. is there are a way that 10 records get cleared after the test has finished?

mkdesign82 started a new conversation Stop Phpunit Of Resetting The Database


how should I stop PHPUnit of removing my tables on each test?

05 Dec
6 months ago

mkdesign82 left a reply on Can Access Accessor Model

getTestAttribute I've found the problem thanks guys

mkdesign82 started a new conversation Can Access Accessor Model

Hi guys

I'm adding a new accessor to my model class likes so

protected $appends = ['test'];

public function getTestAtribute(){

        return 0;

but when I want to use that property it returns me null. also when I want to convert the object to array it throws an error

Call to undefined method Seula\JobOffer::getTestAttribute()

do you guys know what's wrong with that? I'm using laravel 5.7

15 Sep
9 months ago

mkdesign82 started a new conversation Test A User Login From Multi Perspective


I don't know if I'm doing this right or not, I'll randomly test a user login to see if the particular page works fine after the user gets login. Is this way is the right way? because I'm testing a specific page on each user login. some users survive that page others are not and at last face Laravel error page. am I doing it right?

11 Jul
11 months ago

mkdesign82 started a new conversation Redirecting Back On Validation Error Instead Of 422 JSON


I have upgrade Laravel 5.2 to 5.5, after upgrading my validation does not work Property ever since, instead of return JSON 422 response the validation rules Redirecting back to 404 page.

I wanted to know if you guys have hit anything like this before?

10 Jul
11 months ago

mkdesign82 started a new conversation Queue Job Is Not Finishing


I have upgraded my project from Laravel 5.2 to Laravel 5.5, I have 3 Cron jobs and they were working fine in the latest version but now after I've upgraded the project I can see a couple of Cron jobs but there are no records in job table?

so why the Cron job is working?

mkdesign82 started a new conversation Laravel 5.3 Too Much Connection


I was using Laravel 5.2 for a while and after some time I upgrade the project to new version 5.3, now I have this problem which it creates too many connections on the database. and a lot of selects I can see on monitoring the database.

can any help me with this?

18 Apr
1 year ago

mkdesign82 left a reply on Send Email From LocalHost On Mac

hey bro,

now its show me something else[]:587, delay=5.1, delays=0.05/0.06/4.6/0.37, dsn=5.5.1, status=bounced (host[] said: 530-5.5.1 Authentication Required. Learn more at 530 5.5.1 a16-v6sm1173811itd.29 - gsmtp (in reply to MAIL FROM command))

at first, I have used google app two verify authentication, then I've just changed the sasl_passwd file to use my password to log in google, but still nothing.

mkdesign82 started a new conversation Send Email From LocalHost On Mac

hi guys how to send email from my localhost in Macintosh? the only thing appears to me its the below error[]:587, delay=627, delays=613/0.11/14/0, dsn=4.7.8, status=deferred (SASL authentication failed; server[] said: 535-5.7.8 Username and Password not accepted.

guys do you have any idea?

14 Apr
1 year ago

mkdesign82 left a reply on Git Bug Branch

I've taken a look at the link, I can see hotfixes but there are no bugs? so bugs do not need a bug branch for them self? like #feature-number_of_feature, #issue-number-of-issue ?

mkdesign82 left a reply on Git Bug Branch

Thanks, bro for the link.

mkdesign82 left a reply on Git Bug Branch

will review or merging should do upon master branch or dev branch? if someone reviews my code and he/she was 100% sure that no bug is there, then why they merge it with dev branch? why then don't merge it with the master? I think in case I push my feature branches, then there is no need for dev branch?

mkdesign82 started a new conversation Git Bug Branch

hi guys I have made a couple of bug branches on my local machine and I wanted to know, should I push them to remote git or merge them with dev branch then push the dev branch?

30 Mar
1 year ago

mkdesign82 left a reply on Protect Php Webforms From Accessing Without Login

this coasts a lot of time, we are not in the faze of converting the project. I just wanna simpler solution thanks.

mkdesign82 started a new conversation Protect Php Webforms From Accessing Without Login

Hi guys

I have 20 forms (20 PHP file) made with pure PHP, there is no architecture used for building this 20 forms. some of this forms are using for the front of the website and some other are used for the back, dashboard panel. now I want to protect my dashboard panel. which only those users which are login should access it and block access for the rest of users which are not login.

the hierarchy of the application is as below

-- the front index.php invitaion.php language.php lession.php login.php register.php mainHeader.php payments.php pricing.php pricingPanel.php

-- the back panelDashboard.php panelAdmin.php panelCountries.php panelHeader.php panelFooter.php panelLanguage.php panelConsultancy.php panelKeyFacts.php panelExport.php PanelWorldViews.php

the above files as you can see they exist in the root directory. now I want to know how to create a middleware that coasts me fewer changes. or anything that solves my problem.

thanks for any help. if you guys need more info please inform me.

01 Feb
1 year ago

mkdesign82 started a new conversation Stop Users Of Accessing Files In Uploads Folder

Hello, I'm using Laravel 5.3 and I want to stop users from accessing files in the uploads folder. But I have figured it out, that when someone tries to access my file lets says a file name


then the web.php folder will not work. I have put DD at the top of the page and I expected to get trigger but nothing happened. so that's mean if someone tries to access files the routes cant stop it.

Any clue?

21 Jan
1 year ago

mkdesign82 started a new conversation Pre Render Spa

Hi guys,

I'm working on a spa website now, and I'm stuck with the SEO of the website. I working with pre rending VUE module now, but I did not understand it well when I run web pack to build me the whole web pack.conf, it will clone the same index.html again

new PrerenderSpaPlugin(
            path.join(__dirname, 'resources/views'),
            [ '/about-us' ]

the above code is the code I'm using and the result of the above code is a page which is similar to the index.html. so what's happened just now it just clones the index.html page that's it ? or maybe I did not understand it well.

17 Jan
1 year ago

mkdesign82 started a new conversation Stop Select The Database On Each Itterate


I have a table with 700,000 records init with 20 column length, in part of my project I have a foreach which I should select one record from the table, for 400 iterates and 400 select, it took me 46sec to retrieve the 400 results. which is not good. guys do you have any idea to improve the speed and the time I use.

26 Dec
1 year ago

mkdesign82 started a new conversation Ip Middleware


I have made an Ip address middleware which could protect my Controller from foreign accessing, but the problem is there that when I get call the API with Axios, Laravel reject the request with an error that said not authorized. if I removed the middleware anyone could access the API and this is not good. So any help.

19 Dec
1 year ago

mkdesign82 started a new conversation Using The Field Abb In WhereRaw

Hello guys,

I have a query which looks like below

 $circle_radius = 3959;
$max_distance = 20;
$lat = $this->lat;
$lng = $this->lng;

$query->select(DB::raw("id, (".$circle_radius." * acos( cos( radians(12) ) * cos( radians(>'lat' ) ) * cos(radians(>'lng') - radians(10)) +
                    sin(radians(10)) * sin(radians(>'lat'))))
                    AS distance"))->whereRaw(" distance < ".$max_distance)->get();

but after I execute the code laravel tells me there is no field as distance. guys how should I define an abb for a field. thanks for any help.

07 Nov
1 year ago

mkdesign82 started a new conversation Dd() Does Not Open All Ob The Objects In A Collection

Hi, I have 200 hundred records in a collection when i dd() these records only half of them are shown in the browser and the rest of them are close, how should I open all of the objects, should I force dd or something?

02 Nov
1 year ago

mkdesign82 left a reply on This Page Size Is 64kb But There Are Two JS Files Which Their Total Size Is Much Larger Than 1 Mb

I have tested the page in the test speed website and it also gives me the 64kb of size.

mkdesign82 started a new conversation This Page Size Is 64kb But There Are Two JS Files Which Their Total Size Is Much Larger Than 1 Mb


Sorry for the bad title, I'm wondering how is that possible the page that IM init now is 64 kb, i mean the page that i write my comment from it, but there are two huge compressed JS file which their total size is much larger than 1 mb, i'm wondering if there are some way that i Dontknow how to handle magnifying.

thanks for any respond .

mkdesign82 started a new conversation Gulp Production Command Does Not Render Vue Components As Gulp Command


I have made a datagridview vue.js components which it works fine when I use gulp command or gulp watch command, but when I use gulp production the components elements does not render as its expected. I have a select box which using it to show how many records datagridview shall shows. the html rendering is like below

<select class="form-control"><option value="10">10<option value="20">20<option value="50">50<option value="100">100</option></option></option></option></select>

Any one has any idea why this is happening and how should i fix this issue ?

29 Oct
1 year ago

mkdesign82 started a new conversation How To Use Laravel Elixir To Generate Appropriate Files In Production State


I'm working on laravel project and everything goes fine until I wanted to publish my project to production but there are some wrong happened with the production, first of all, the addresses are my local address after I've changed my address to the host address it show's me an error that says

Access to Font at 'http://localhost:8000/fonts/IRANSans.ea6dfae.ttf' from origin '' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '' is therefore not allowed access.

and my gulp file

const elixir = require('laravel-elixir');
var path = require("path");
//var extract = require("extract-text-webpack-plugin");
 | Elixir Asset Management
 | Elixir provides a clean, fluent API for defining some basic Gulp tasks
 | for your Laravel application. By default, we are compiling the Sass
 | file for your application as well as publishing vendor resources.

elixir((mix) => {

        output: {
             path: '/',
            //publicPath: 'http://localhost:8000/' // Development Server
             publicPath: "" // Production Server
        module: {
                    test: /\.js$/,
                    loader: 'buble-loader'
                    test: /\.css$/,
                    test: /\.scss$/,
                    loader: 'style-loader!css-loader!sass-loader'
                    test: /\.vue$/,
                    loader: 'vue-loader'
        resolve: {
            extensions: ['', '.js', '.vue', '.json', '.css'],
            alias: {
                vue: 'vue/dist/vue.js',
                'vue$': 'vue/dist/vue.esm.js'
        //plugins: [
        //    new extract("styles.css")

    //mix.browserify('./resources/assets/js/app.js', './public/app.js');
    mix.webpack('./resources/assets/js/vendor-js.js', './public/vendor-js.js');
    mix.webpack('./resources/assets/js/vendor-css.js', './public/vendor-css.js');

    // factor
    mix.browserify('./resources/assets/js/invoice/create.js', './public/invoice-create.js');
    mix.browserify('./resources/assets/js/invoice/index.js', './public/invoice-index.js');

    // formula
    mix.browserify('./resources/assets/js/formula/create.js', './public/formula-create.js');

    // formula item
    mix.browserify('./resources/assets/js/formula/items/create.js', './public/create-item.js');

    mix.browserify('./resources/assets/js/agency/create.js', './public/create-agent.js');

    //mix.sass('./resources/assets/sass/font.scss', "./public/font.css");
    //mix.browserify('./resources/assets/js/shared/data-grid.js', './public/data-grid.js');
    //mix.browserify('./resources/assets/js/shared/test.js', './public/test.js');

    //mix.sass('./resources/assets/sass/app.scss', 'public/app.css')

27 Oct
1 year ago

mkdesign82 started a new conversation Use A Single Javascript File Per Each Page

Hello, I'm working on laravel project, and I'm using vue.js for the front of my admin page. I have a couple of problems using VUE file on my page.

first: I should create a javascript file for each one of my pages, let's say I have [post/create, post/delete, post/update] this mean I should create 3 javascript file and use gulp to browsing them. now let's guess I had more pages like comments [comment/show, comment/answer, comment/update], now more javascript file comes on the way.

so I thought what if I Make one file like app.js and put all of my codes there, but the project is not going to be a spa so this solution is working only on spa's because refreshing the page is not necessarily on spa projects.

what should I do to decrease the javascript total files, and also using Vue for each page because I'm using Vue to handle all of the operations on the page?

thanks for any solution.

21 Aug
1 year ago

mkdesign82 started a new conversation How To Create A Tag In Git With Only Specific Commits

Hello guys, I'm working on a project and this project has two branches, I have made three changes on master branch, I want to create a tag based on the first commit, this is okay then I wanted to create the second tag on the third commit but I don't want to include the second commit on the second tag , does it have such command ?

25 Jul
1 year ago

mkdesign82 started a new conversation _vue2.default.validator Is Not A Function

Hello I'm using Elixir with my project, I have used the below code in my app.js

import Vue from 'vue';
import validators from 'vue-validator';

Vue.validator('email', function (val) {
    return /^(([^<>()[\]\\.,;:\[email protected]\"]+(\.[^<>()[\]\\.,;:\[email protected]\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(val);

after I include bundle.js in my project i can only see the error _vue2.default.validator. I'm also used Vue.use(validators); but the console show me a warning of [vue-validator] already installed.

I really don't know what's going on. I'll appreciate any help.

15 Jul
1 year ago

mkdesign82 started a new conversation Create Feature Branch In Git

Hello, guys, I'm new to git but I've learned most of the commands. I have started a new project and I have sold about 15 copy of this web project. now let's guess one my customer calls me and say, hey can you make me a feature for my project and in response I say yes why not so I began to start a new branch of the master branch and made that feature then I'll merge that branch with the master branch. every thing is good and okay until the same customer calls me and say hey can you make me a new feature, in response, i say yeah, so I began to start a new branch of a master branch. the problem is that when I made a new branch of master branch all of the codes from the first feature will clone in the second feature which I do not necessarily need that coz maybe one of my other customers call me and say I need the second feature, but as I describe above that feature maintain the first feature codes. so any one knows how to handle this kind of problems? or maybe I should make any feature as a package.

thanks for any help

14 Jun
2 years ago

mkdesign82 started a new conversation Bind Multiple Concrete On Same Abstraction

Hello, I'm binding 3 concrete class on one abstract class, now i want to inject the second concrete class into my constructor, but unfortunetly laravel only pass the last registered concrete class which is not what I'm looking for, so how should i resolve the third concrete class which i have registered for that abstract class into the container. thx for any help .

16 May
2 years ago

mkdesign82 started a new conversation Invalid Expression. Generated Function Body

Hello I have wrote a tutorial and into this tutorial I'm using vue curly braces syntax to print something out , and I'm also using vue in my blog too . when I have wrote that tutorial and wanted to reload the page then suddenly vue has warn me with an error , that error was referring to the curly braces {{route('post.index')}}, after understand the error whenever I see a curly braces i'll replace it with something else, until now its doing fine, but what should i do to avoid this problem ? the full error is

Vue warn]: Invalid expression. Generated function body:  "<p dir="scope.rtl">توی این آموزش میخوام نحوه ساختن دیتا گرید با استفاده از <code>vue.js</code> و <code>ajax</code> رو آموزش&nbsp;بدم . من توی محیط <code>laravel</code> میخوام این آموزش رو انجام بدم . لذا افرادی که با فرم ورک لاراول آشنایی کافی رو ندارن هیچ مشکلی نداره ، فقط فرض کنید که توی صفحات مختلف <code>php</code> بخواید از <code>vue.js</code> استفاده کنید .</p>\n<p dir="scope.rtl">کاراهای که واسه ساختن این دیتا گرید باید انجام بدیم .</p>\n<p dir="scope.rtl">1 - ساختن یک بانک اطلاعاتی فرقی نمیکنه ، Mysql , Sqlsrv</p>\n<p dir="scope.rtl">2&nbsp;- ایجاد ارتباطات بین فرم ورک و بانک اطلاعاتی</p>\n<p dir="scope.rtl">3&nbsp;- ساختن یک تیبل و ایجاد model من اینجا از یک تیبل به نام posts استفاده میکنم.</p>\n<p dir="scope.rtl">4&nbsp;- ایجاد یک کنترلر به نام postController و ساخت یک اکشن به نام index</p>\n<p dir="scope.rtl">5&nbsp;- ایجاد یک route به نام اکشن تعریف شده در کنترلر .</p>\n<p dir="scope.rtl">6&nbsp;- ساخت core اصلی دیتا گرید با vue.js</p>\n<p dir="scope.rtl">7&nbsp;- تبدیل core &nbsp;به کمپوننت .</p>\n<h4 dir="scope.rtl"># ساخت یک بانک اطلاعاتی</h4>\n<p dir="scope.rtl" style="scope.text-scope.align:scope.right;">واسه ساختن بانک اطلاعاتی خیلی راحت میتونید با استفاده از Phpmyadmin یک بانک اطلاعاتی رو بسازید . اسم بانک اطلاعاتی را میزارم datagrid .&nbsp;</p>\n<h4 dir="scope.rtl" style="scope.text-scope.align:scope.right;"># ایجاد ارتباط بین فرک ورک و بانک اطلاعاتی</h4>\n<p dir="scope.rtl">واسه ایجاد کردن ارتباط بین فرم ورک و بانک اطلاعاتی مورد نظر میتونیم از فایل .env اقدام کنیم و این دستورات رو به اطلاعات مورد نظر خودمون تغییر بدیم .</p>\n<pre class="scope.language-scope.php"><code>DB_CONNECTION=mysql\nDB_HOST=\nDB_PORT=3306\nDB_DATABASE=datagrid\nDB_USERNAME=root\nDB_PASSWORD=</code></pre>\n<p dir="scope.rtl" style="scope.text-scope.align:scope.right;">&nbsp;</p>\n<h4 dir="scope.rtl" style="scope.text-scope.align:scope.right;"># ساخت یک تیبل با استفاده از migrations</h4>\n<p dir="scope.rtl">با استفاده از دستور</p>\n<pre class="scope.language-scope.php"><code>php artisan make:migration post</code></pre>\n<p dir="scope.rtl">یک فایل migration ساخته میشود که توی متد up &nbsp;میتونید دستورات پایین رو بنویسید .</p>\n<pre class="scope.language-scope.php"><code>Schema::create('posts', function (Blueprint $table) {\n    $table-&gt;increments('id');\n    $table-&gt;string('title');\n    $table-&gt;string('content');\n    $table-&gt;string('slug');\n    $table-&gt;string('thumbnail');\n    $table-&gt;timestamps();\n});</code></pre>\n<p dir="scope.rtl">سپس با استفاده از دستور زیر&nbsp;تیبل مورد نظر با موفقیت ساخته میشود .</p>\n<pre class="scope.language-scope.markup"><code>php artisan migrate</code></pre>\n<p dir="scope.rtl">بعد از ساخت تیبل میتوانیم با استفاده از مدل خود را ایجاد کنیم .</p>\n<pre class="scope.language-scope.php"><code>php artisan make:model Post</code></pre>\n<p>&nbsp;</p>\n<h4 dir="scope.rtl" style="scope.text-scope.align:scope.right;"># ایجاد کنترلر &nbsp;postController و اکشن index</h4>\n<pre class="scope.language-scope.php"><code>php artisan make:controller PostController</code></pre>\n<p dir="scope.rtl">ایجاد یک اکشن در کنترلر به نام index</p>\n<pre class="scope.language-scope.php"><code>public function index(){\n   \n    reutrn Post::get();\n}</code></pre>\n<h4 dir="scope.rtl" style="scope.text-scope.align:scope.right;">#&nbsp;ایجاد یک route &nbsp;با نام اکشن مورد نظر</h4>\n<pre class="scope.language-scope.php"><code>Route::get("", [""=&gt;"", "scope.uses"=&gt;"[email protected]"])</code></pre>\n<h4 dir="scope.rtl" style="scope.text-scope.align:scope.right;"># ساخت core &nbsp;اصلی datagrid</h4>\n<pre class="scope.language-scope.markup"><code>&lt;div class="scope.container"&gt;\n   &lt;table&gt;\n      &lt;tr&gt;\n          \n      &lt;/tr&gt;\n   &lt;/table&gt;\n&lt;/div&gt;</code></pre>\n<p dir="scope.rtl">خوب خیلی راحت یک تیبل ساختیم که این تیبل شامل یک تگ tr &nbsp;میباشد .&nbsp;</p>\n<p dir="scope.rtl">حالا میخوایم مقادیر رو با استفاده از ajax صدا بزنیم و در یک متغیر data آنها رو بریزیم .</p>\n<pre class="scope.language-scope.javascript"><code>new Vue({\n    el:".container",\n    data:{\n        posts:""\n    }\n    ready:function(){\n        var vm = this;\n        $.ajax({\n            url:"{!!scope.action('[email protected]')!!}",\n            type:"scope.get",\n            success:function(e){\n                vm.posts = e;\n            }\n        })\n    }\n})</code></pre>\n<p dir="scope.rtl">بعد از اینکار باید بتوانیم مقادیر موجود در متغیر را نشان دهیم .</p>\n<pre class="scope.language-scope.markup"><code>&lt;div class="scope.container"&gt;\n   &lt;table&gt;\n      &lt;thead&gt;\n          &lt;tr&gt;\n            &lt;td&gt;#&lt;/td&gt;\n            &lt;td&gt;موضوع&lt;/td&gt;  \n            &lt;td&gt;تاریخ ایجاد&lt;/td&gt;\n            &lt;td&gt;تاریخ ویرایش&lt;/td&gt;    \n          &lt;/tr&gt; \n      &lt;/thead&gt;\n      &lt;tr v-for="scope.postinposts"&gt;\n          &lt;td&gt;@"+("post.title")+"'&lt;/td&gt;\n      &lt;/tr&gt;\n   &lt;/table&gt;\n&lt;/div&gt;</code></pre>\n<p>&nbsp;</p>
09 May
2 years ago

mkdesign82 started a new conversation Killing The Execution After Certain Time Of Sleep .

Hello I have a text box, on key up event it'll call an ajax and the ajax method send the request to the server . server w'll do some operations and it return back the results . every thing till now working fine . if some one type something too fast then something bad going to happened , it will rapidly send requests until it finishes it job and this is not good . so what do I need, I want to use sleep method and save any request until i reach the last request. so i mean if there were 5 request one after other, I should only care about the last request, grab the last request do some calculation and then return the result . I can do this with jquery but i want to do it with php . request ... request ... request ... request ...

If any one knows how to be done . i'll appreciate.

23 Apr
2 years ago

mkdesign82 started a new conversation Convert Payload Field In Job Table

Hello, how to run the operations in the Payload field in job table and i'll like to know how laravel really make work of that field . Thx for any help .

08 Apr
2 years ago

mkdesign82 left a reply on Access Parent Component Data From The Nested Child Component

hi @mdecooman

thx for the respond, but I think vuex will help me alot on this problem share the store property .

mkdesign82 left a reply on Access Parent Component Data From The Nested Child Component

@Abi thx for the description, but I didn't write nested components. I've used the second component into the first component but they are totaly separated. I mean i did not do it like below

vue.component("first-component", { template:"


", component:{

} })

so in this case i cant access the parent data i just can access root data.

but if I wrote my component using the above structure then I think some problems go away

03 Apr
2 years ago

mkdesign82 left a reply on Access Parent Component Data From The Nested Child Component

var parent = new Vue({

vue.component("first_component", "<div>  <second_component></second_component>  </div>")

vue.component("second_component", "<div> this is the second component </div>")

this.$ will access the parent data, But i want to access the first_component data from the second_component.

this going to be happen if I pass the data to the parent then broadcast it to the childrens, but this not what I want, coz it makes alot of duplication.

mkdesign82 started a new conversation Access Parent Component Data From The Nested Child Component

hi I have made a component which inner of this component i have another component What do i really want to do is to access the first component data from the second child component .

<template id="gallery">
    <div class="gallery_wrapper">
        <div class="modal fade uploader" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" style="padding:0px !important;">
            <div class="modal-dialog  modal-lg" role="document">
                <div class="modal-content" style="border-radius: 2px;">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" style="float:left;" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="myModalLabel">آپلود</h4>
                    <div class="modal-body" style="padding-right:3px;padding-left:0px;">
                        <!-- Nav tabs -->
                        <ul class="nav nav-tabs" role="tablist">
                            <li role="presentation" style="float:right" v-bind:class="{active: active_file_tab}" class="active"><a href=".show_upload" aria-controls="upload" role="tab" data-toggle="tab">آپلود</a></li>
                            <li role="presentation" style="float:right" v-bind:class="{active: !active_file_tab}" ><a href=".show_gallery" v-on:click="getGallery" aria-controls="show" role="tab" data-toggle="tab">نمایش</a></li>

                        <!-- Tab panes -->
                        <div class="tab-content" style="height:inherit">
                            <div role="tabpanel"  class="tab-pane active show_upload" v-bind:class="{active: active_file_tab}" style="position:relative;height:inherit" id="upload">
                                {!! Form::open(["url"=>action('[email protected]'), "class"=>"dropzone", "id"=>"dropzone", "style"=>"height:100%;"]) !!}
                                <input type="file" name="file" style="display:none;" />
                                {!! Form::close() !!}
                            <div role="tabpanel" class="tab-pane show_gallery" v-bind:class="{active: !active_file_tab}" id="show">
                                <div class="uploader_file_info">
                                <div class="files_wrapper" style="width: 80%;float: left;">
                                    <div class="uploader_tools_wrapper" style="padding:12px;overflow:auto;">
                                        <input type="text" placeholder="جستجو" value="" v-model="searched" v-on:keyup="search" style="width: 16%;height: 30px;font-size: smaller;"/>
                                    <upload_file_wrapper :selected_file="selected_file"></upload_file_wrapper>
                    <div class="modal-footer" style="clear:both;">
                        <button type="button" class="btn btn-primary" v-on:click="useFile">استفاده از فایل</button>
        <a href="#" class="uploader_modal btn btn-primary" v-bind:style="style" v-on:click="showModal" style="font-size: smaller;float:left;">
            @{{ ( button_name != undefined ) ? button_name : استفاده از گالری}}

<template id="upload_file_wrapper">
    <span class="file_container" v-for="file in $parent.files" v-show="file.visible == true">
            <span class="file_size_wrapper" transition="fade" v-show=" file.show_size == true && $parent.selected_file.length > 0 ">
                <span class="file_size">
                    <span class='thumbnails' v-on:click="selectSize(, 'thumbnail_large', $event)"
                          v-show="file.thumbnail_large == true">LG</span>

                    <span class='thumbnails' v-on:click="selectSize(, 'thumbnail_big', $event)"  v-show="file.thumbnail_big == true">BG</span>
                    <span class='thumbnails' v-on:click="selectSize(, 'thumbnail_small', $event)"  v-show="file.thumbnail_small == true">SM</span>
                    <span class='thumbnails' v-on:click="selectSize(, 'thumbnail_extra_small', $event)"  v-show="file.thumbnail_extra_small == true">XS</span>
            <span class="file_wrapper" v-bind:class="{activate:file.is_active}" v-on:click="toggleCheck($index)">

01 Apr
2 years ago

mkdesign82 left a reply on Test Controller Static Method

For that error ... yeah, I use classmap in my composer

"classmap": [

and yeah my class is located in that directory app/helpers/class, Thumbnail.php and I access it in my controller with use Thumbnail;

I think i'll not face any problem to test the Thumbnail class itself, but what I wanted to test is the full controller method, integration test which the static thumbnail::make method should be part of it.

I know that thumbnail class is working pretty fine but I want to test it in different situations .

mkdesign82 left a reply on Test Controller Static Method

nope, I have not perform any Unit Test for that method Make in that class Thumbnail .

mkdesign82 started a new conversation Test Controller Static Method

hi I have called static method from my controller how should I test this method ?

controller code

 $this->validate($this->request, ["title"=>"required|unique:posts,title"]);
        $inputs = $this->request->except(["_token"]);

        // If the visible status was not on then we set it to 1
        if ($this->request->visible == "on")
            $inputs["visible"] = 1;

        // If there was thumbnail
        $inputs["thumbnail"] = Thumbnail::make($inputs["thumbnail"]);

        $post_id = $this->post->create($inputs)->id;

        // return back on http request
        if (!$this->request->ajax()){
            return redirect(action('[email protected]'))
                ->with(["msg"=>"post has been created."]);
            return json_encode(["post_id"=>$post_id, "part"=>"create"]);