mostafalaravel

mostafalaravel

Member Since 2 Years Ago

Experience Points 4,140
Experience Level 1

860 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 1
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.

24 Jun
1 day ago

mostafalaravel started a new conversation Vue Calendar

Hello ,

I'm looking for a vue JS Calendar which could :

1- Click date to read/create event.

2- Create event also by selecting a rang of dates.

what is the best one you advise me ?

Thanks

mostafalaravel started a new conversation PHP Traits

Hello ,

I would like to know about PHP traits :

1- what is Traits?

1- why using traits ?

thanks

21 Jun
4 days ago

mostafalaravel started a new conversation How To Document My Work

Hello

As you can see from the title , I would like to know How to document my Laravel project and what this documentation should have, tools , steps ...

If there is any tutorial or doc, please provide it to me .

Thanks

19 Jun
6 days ago

mostafalaravel started a new conversation Laravel And Gitlab

Hello ,

I would like to know when I Merge a branch to Master, how to update my files on the production server (web hosting) ?

Thanks

14 Jun
1 week ago

mostafalaravel started a new conversation How To Create Composer Package ?

Hello ,

How to create a composer package ? I have no idea about so what I'm looking for is a tutorial or a documentation.

Thanks

13 Jun
1 week ago

mostafalaravel started a new conversation What Should To Learn To Be A Laravel Pro

Hello ,

As you can see on the title , I would like to know what I have to learn in Laravel to be a professional .

now I have a medium experience with Laravel I can finish a project from A to Z but I still feel have less knowledge .

What I mean is what techniques should I learn (like laravel mix ....) ?

Thanks

08 Jun
2 weeks ago

mostafalaravel started a new conversation How To Use Added Yarn Package?

Hi,

I installed the fullcalendar package via Yarn :

yarn add --save @fullcalendar/core @fullcalendar/daygrid --no-bin-links

In my blade file :

@extends('layouts.app')

@section('style')
    <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.2.7/fullcalendar.min.css"/>
@endsection

@section('content')
    <div class="container">
        <div class="row">
            <div class="col-md-8 col-md-offset-2">
                <div class="panel panel-default">
                    <div class="panel-heading">Full Calendar Example</div>

                    <div class="panel-body">
                        {!! $calendar->calendar() !!}
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection

@section('script')
    <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.2.7/fullcalendar.min.js"></script>
    {!! $calendar->script() !!}
@endsection

Question how to use that package instead of :

    <script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.2.7/fullcalendar.min.js"></script>

Thanks

28 May
4 weeks ago

mostafalaravel started a new conversation How To Install This IBAN Validator In LARAVEL

Hello ,

Im workin on 5.2 laravel project and I would like to install this package : https://github.com/globalcitizen/php-iban to verify the IBAN code.

Now i use the verification from the AppServiceProvider

...
        Validator::extend('iban', function ($attribute, $value, $parameters, $validator) {
            $value = strtolower(str_replace(' ', '', $value));
            $Countries = array('al'=>28,'ad'=>24,'at'=>20,'az'=>28,'bh'=>22,'be'=>16,'ba'=>20,'br'=>29,'bg'=>22,'cr'=>21,'hr'=>21,'cy'=>28,'cz'=>24,'dk'=>18,'do'=>28,'ee'=>20,'fo'=>18,'fi'=>18,'fr'=>27,'ge'=>22,'de'=>22,'gi'=>23,'gr'=>27,'gl'=>18,'gt'=>28,'hu'=>28,'is'=>26,'ie'=>22,'il'=>23,'it'=>27,'jo'=>30,'kz'=>20,'kw'=>30,'lv'=>21,'lb'=>28,'li'=>21,'lt'=>20,'lu'=>20,'mk'=>19,'mt'=>31,'mr'=>27,'mu'=>30,'mc'=>27,'md'=>24,'me'=>22,'nl'=>18,'no'=>15,'pk'=>24,'ps'=>29,'pl'=>28,'pt'=>25,'qa'=>29,'ro'=>24,'sm'=>27,'sa'=>24,'rs'=>22,'sk'=>24,'si'=>19,'es'=>24,'se'=>24,'ch'=>21,'tn'=>24,'tr'=>26,'ae'=>23,'gb'=>22,'vg'=>24);
           
...
22 May
1 month ago

mostafalaravel started a new conversation How To Change PHP Version In Homestead

After doing the vagrant up, when I check the php version :

php -v
PHP 7.3.2 (cli) (built: Feb  5 2019 23:16:38) ( ZTS MSVC15 (Visual C++ 2017) x86 )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.2, Copyright (c) 1998-2018 Zend Technologies

Homestead.yaml:

ip: 192.168.10.10
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
    - ~/.ssh/id_rsa
folders:
    -
        map: 'C:\Users\mabdella\Codes\HighAxions'
        to: /home/vagrant/code
sites:
    -
        map: highaction.test
        to: /home/vagrant/code/public
        php: "5.6"
databases:
    - homestead
name: highaxions
hostname: highaxions

As you can see event the php version value is 5.6 I still have that problem !

20 May
1 month ago

mostafalaravel started a new conversation SSH Php Version Not The Same As Vagrant

Hello,

when I run php version from the SSH vagrant :

php -v
PHP 7.1.28-1+ubuntu18.04.1+deb.sury.org+3 (cli) (built: Apr 10 2019 10:50:29) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.1.28-1+ubuntu18.04.1+deb.sury.org+3, Copyright (c) 1999-2018, by Zend Technologies
    with blackfire v1.24.4~linux-x64-non_zts71, https://blackfire.io, by Blackfire

but If I exit from the SSH :

php -v
PHP 7.3.2 (cli) (built: Feb  5 2019 23:16:38) ( ZTS MSVC15 (Visual C++ 2017) x86 )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.2, Copyright (c) 1998-2018 Zend Technologies

What Im looking for is to downgrade php version to 7.1 (laravel 5.2)

NOTE :

on phpinfo() ; PHP verison is 7.3 !

thanks

10 Apr
2 months ago

mostafalaravel started a new conversation REGEXP_REPLACE In Raw Sql

Hello ,

I created a reg_exp to change the URL and keep the file name ,

you can see here : https://regex101.com/r/Exh39n/5

but in sql request it's not working ! :

select REGEXP_REPLACE(body,'http:.*?/(\w+\.\w{3,4})(?=\W+)','http://newsite.com/') from DA_forum limit 450,1;
02 Apr
2 months ago

mostafalaravel started a new conversation Url_encode Must Always Be Befor The Url_decode ?

Hello ,

I'm wondering if all get data must be url encoded or the browser could do it all the time ?

is there some cases when the url encode is a must ?

thanks

mostafalaravel started a new conversation Does Mysqli Prepare Prevents Sql Injection?

Hello ,

I want to know if the Mysqli prepare() could prevent the sql injection ?

$UserInfoQuery = "select Id,Type,IsActive,FirstName,LastName,Title,LanguageCode,Email,Type,TypeExtra,IsAdministrator,IsSuperAdministrator from Users where (Id = ? or Email = ?) and IsDeleted = '0'";
                                    $UserInfoResults = $DbConn->prepare($UserInfoQuery);
                                    $UserInfoResults->execute(array($Parameters[1],$Parameters[1]));

thanks

28 Mar
2 months ago

mostafalaravel started a new conversation What Returns $_SERVER['HTTP_HOST']?

Hello ,

What returns $_SERVER['HTTP_HOST'] from this url ?

https://abc.xyz.website.com/user/login/en

Thanks ?

26 Mar
2 months ago

mostafalaravel started a new conversation What's The Best WYSIWYG

Hello

I'm looking for a free WYSIWYG, very simple to implement and very very basic (strong text, paragraph ...)

thanks for helps.

25 Mar
3 months ago

mostafalaravel started a new conversation PHP : PDOStatement::bindParam() Expects Parameter 3 To Be Long, String Given

Hello , why this code return me this message :

PDOStatement::bindParam() expects parameter 3 to be long, string given

Here the code :

 try {

                                        $SetForeignKeyChecksZero = $DbConn->prepare("set foreign_key_checks = 0");
                                        $SetForeignKeyChecksZero->execute();
                                        $AccessRightsByTripletInsertQuery = $DbConn->prepare("insert into AccessRightsByTriplet 
                                        (DSTL1,DSTL2,DSTL3,AccessRightId,AccessRightsByGroupId) values(?,?,?,?,?)");
                                        $AccessRightsByTripletInsertQuery->bindParam('sssii',$TripletDataRow["DSTL1"],$TripletDataRow["DSTL2"],$AccessRightId,$AccessRightsByGroupId);
                                        $AccessRightsByTripletInsertQuery->execute();

                                         }
21 Mar
3 months ago

mostafalaravel started a new conversation How To Make Exmaple.test Local Domain Name

Hello ,

I would like to create a local domain name (example.test) in my machine instead to this IP 10.2.33.11

I use windows 10

thanks :)

19 Mar
3 months ago

mostafalaravel started a new conversation How To Start All Services At Once

Hello ,

I work on Laravel, Lumen , vueJS and for every one I have to run it's specific command :

php -S localhost:8000 -t public (in a specific folder)

php artisan serve --port=8080 (in a specific folder)

npm run watch (in a specific folder)

..

Is there any solution to create an exe or bat file and run it on windows startup ?

Thanks

mostafalaravel started a new conversation How To Display Child Component Only After Loading

Hey ,

I added the "participations" component in the "actions" component , this works well BUT how to display the "Participations" component only after the "actions" component is loaded and ready ?

thanks

18 Mar
3 months ago

mostafalaravel started a new conversation How To Change Params In Chil Component

Hello

In the current component : "action_details" I call the "participations" component:

...
            </div>
        </div>

        <div class="card-title">
        <participations></participations>
</div>

    </div>
</template>

This component "action_details" have :

<script>
    import Participations from "./participations";
    export default {
        name: "action_details",
        components: {Participations},
        data() {
            return {
                actionDetails: null,
            }
        },
        methods: {
            getAction_details: function (action) {
                let self = this;
                axios.get(process.env.MIX_APP_URL + `/api/actions/` + action, {

                })
                    .then(response => {
                        delete response.data.id
                        self.actionDetails = response.data
                    })
                    .catch(e => {
                        this.errors.push(e)
                    })

            },
            listRelatedParticipations: function () {
                let self = this;
            }
        },
        mounted() {
            let self = this;
            self.getAction_details(process.env.MIX_ACTION_DETAIL_ID);
        }
    }
</script>

I would like to create function: listRelatedParticipations

to set the parameter "action_number" in the child component "participations" to list only participations with -lets say action_number=10001 -

here the "participations" component JS :

...
       data() {
            return {
                participationFilterContent: {
                    "action_number": null,
                    "status": null,
                    "participation_date": null,
                    "name": null,
                    "firstname": null,
                    "address": null,
                    "streetnumber": null,
                    "box": null,
                    "country": null,
                    "zipcode": null,
                    "city": null,
                    "telephone": null,
                    "mobile": null,
                    "email": null,
                    "iban": null,
                    "bic": null,
                    "participation_id": null,
                    "refusal_responds_participation_id": null,
                    "repayment_information": null,
                    "page": 1,
                    "per_page": 25
                },
                participationsList: [],
                total: 0,
                last_page: 1,
                select_per_page: [25, 50, 100]
            }
        },
...

mostafalaravel started a new conversation Laravel Vue Router Not Working

Hey there ,

I have some troubles with the router , I cant see the content of any component:

here the Welcome blade :

<!doctype html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>Action Follow Up v2</title>

    <!-- Fonts -->

    <!-- Styles -->
    <link href="{{ asset('css/app.css') }}" rel="stylesheet">

</head>
<body>
<noscript>
    <strong>We're sorry but Action Follow Up v2 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app">
    <nav>
        <router-link to="/">action</router-link>
        <router-link to="/action_details/154">details</router-link>
    </nav>
</div>
<script type="text/javascript" src="/js/app.js"></script>
</body>
</html>

router JS :

import Vue from 'vue'
import Router from 'vue-router'
import actions from './components/actions.vue'
import action_details from './components/action_details.vue'

Vue.use(Router)

export default new Router({
    routes: [
        {
            path: '/',
            name: 'actions',
            component: actions
        },
        {
            path: '/actions/:action',
            name: 'action_details',
            component: action_details
        }
    ]
})

app.js


/**
 * First we will load all of this project's JavaScript dependencies which
 * includes Vue and other libraries. It is a great starting point when
 * building robust, powerful web applications using Vue and Laravel.
 */

require('./bootstrap');

window.Vue = require('vue');

import axios from 'axios';
Vue.use('axios')

Vue.use(require('vue-moment'));

var Paginate = require('vuejs-paginate')
Vue.component('paginate', Paginate)

import router from './router'

/**
 * The following block of code may be used to automatically register your
 * Vue components. It will recursively scan this directory for the Vue
 * components and automatically register them with their "basename".
 *
 * Eg. ./components/ExampleComponent.vue -> <example-component></example-component>
 */

// const files = require.context('./', true, /\.vue$/i)
// files.keys().map(key => Vue.component(key.split('/').pop().split('.')[0], files(key).default))

Vue.component('participations', require('./components/participations.vue').default);

/**
 * Next, we will create a fresh Vue application instance and attach it to
 * the page. Then, you may begin adding components to this application
 * or customize the JavaScript scaffolding to fit your unique needs.
 */

const app = new Vue({
    router,
    el: '#app'
});

Thanks

15 Mar
3 months ago

mostafalaravel started a new conversation Why Using : Let Self = This?

Hello,

I would like to know why in Vue js it's recommended to use let self = this; instead of "this." ?

thanks

mostafalaravel started a new conversation Faker To Generate 2-3 Letters Word

Hello ,

How to generate one word with 2 or 3 characters in uppercase like : AZ, RFE, 5MP,54 ...

thanks

mostafalaravel left a reply on Best PhpStorm Tool To Format Code

@TOKOIWESLEY - hey ,

I user the crl+alt+L but it's not very efficient , i'm looking if there is something else .

mostafalaravel started a new conversation Is There A Way To See If My Vue Component Is Without Unused Variables ?

Hello ,

I would like to know if there is any tool to verify my vue component code to see for example if there is non used variables on my code .

Thanks

mostafalaravel started a new conversation Best PhpStorm Tool To Format Code

Hello ,

Is there any tool in PhpStorm to format code except the ctrl+alt+l?

thanks

14 Mar
3 months ago

mostafalaravel started a new conversation TailwindCSS `@apply` Cannot Be Used With `.table-collapse`

Hello ,

I try to make a css class based on tailwindCSS.

here my CSS part :

...
    .participation-table{
        @apply .w-auto .text-left .table-collapse;
    }
</style>

I try to use it on my template :

template>
    <div class="overflow-x-scroll">
        <table class="participation-table">
            <thead>
            <tr>
...

This is the error :


(239:5) `@apply` cannot be used with `.table-collapse` because `.table-collapse` either cannot be found, or its actual definition includes a pseudo-selector like :hover, :active, etc. If you're sure that `.table-collapse` exists, make sure that any `@import` statements are being properly processed *before* Tailwind CSS sees your CSS, as `@apply` can only be used for classes in the same CSS tree.

12 Mar
3 months ago

mostafalaravel started a new conversation Integer As Index Of Object Element

Hello , I would like to know if putting integer as index in object is a good practice in JS :

sub_tables: {
                    27: ["Name", "Value", "Is internal"],
                    28: ["Article number", "Description NL", "Description FR", "Description EN", "Quantity", "Value"],
                    29: ["Code", "Refusal NL", "Refusal FR", "Refusal EN", "Refusal date", "Impression report", "Responds date"],
                    30: ["Reason NL", "Reason FR", "Reason EN", "Article", "Value", "Request date", "Response date", "Response"],
                    31: ["Date", "Time", "Closure date", "Code", "Description NL", "Description FR", "Description EN", "Info"]
                }
11 Mar
3 months ago

mostafalaravel left a reply on CORS Erro In Laravel Vue

when I remove :

    <meta name="csrf-token" content="{{ csrf_token() }}">

from the blade file it works !

mostafalaravel started a new conversation TensorFlow In Vue JS

I would like to use TensorFlow in vue JS , but I dont know HOw ?

Do you have any idea how it could be possible?

I want to retrieve text from image (camera)

Thanks

mostafalaravel started a new conversation CORS Erro In Laravel Vue

hello I have a Lumen API service Listening on http://localhost:8000

also I'm working on a Laravel project witch is running on : http://127.0.0.1:8080

But when I try to use the Lumen API service It returns me this error message :

Access to XMLHttpRequest at 'http://localhost:8000/api/actions?page=1&per_page=25' from origin 'http://localhost:8080' has been blocked by CORS policy: Request header field x-csrf-token is not allowed by Access-Control-Allow-Headers in preflight response.

this is the method to call this API :


            actionFilter: function () {
                //console.log('from actionfilter()', this.actionFilterContent.page)

                axios.get(`http://localhost:8000/api/actions`, {
                    params: this.actionFilterContent
                })
                    .then(response => {
                        this.actionsList = response.data;
                        this.total = response.data.total;
                        this.last_page = response.data.last_page
                        console.log(response.data);
                    })
                    .catch(e => {
                        this.errors.push(e)
                    })

            }

In Lumen :

I added the CORS middlware :

<?php
namespace App\Http\Middleware;

use Closure;

class CorsMiddleware
{
    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */
    public function handle($request, Closure $next)
    {
        $headers = [
            'Access-Control-Allow-Origin'      => '*',
            'Access-Control-Allow-Methods'     => 'POST, GET, OPTIONS, PUT, DELETE',
            'Access-Control-Allow-Credentials' => 'true',
            'Access-Control-Max-Age'           => '86400',
            'Access-Control-Allow-Headers'     => 'Content-Type, Authorization, X-Requested-With'
        ];

        if ($request->isMethod('OPTIONS'))
        {
            return response()->json('{"method":"OPTIONS"}', 200, $headers);
        }

        $response = $next($request);
        foreach($headers as $key => $value)
        {
            $response->header($key, $value);
        }

        return $response;
    }
}

mostafalaravel started a new conversation Laravel Vue, How To Npm Run Serve

Hello , I'm used on vueJS when work on it to type npm run serve and once I change something it will automatically applied on the browser,

But in laravel I dont see that ! should I every time when I make any change to run : npm run development ???

is there any other solution ?

thanks

08 Mar
3 months ago

mostafalaravel left a reply on Blank Page After Building Vue.js Applications For Production

not during the compilation , but when I run index.html I see :

app.97102613.css:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
app.44fffbf1.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
chunk-vendors.4b14f4b0.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
/C:/favicon.ico:1 Failed to load resource: net::ERR_FILE_NOT_FOUND

mostafalaravel started a new conversation Blank Page After Building Vue.js Applications For Production

Hello , After running :

npm run build

I got a blank page when I go to index.html in dist folder !

how to fix it ?

this is my route :

import Vue from 'vue'
import Router from 'vue-router'
import actions from './components/actions.vue'
import action_details from './components/action_details.vue'
import participations from './components/participations.vue'
import participation_details from './components/participation_details.vue'

Vue.use(Router)

export default new Router({
    routes: [

        {
            path: '*',
            redirect: '/actions'
        },
        {
            path: '/actions',
            name: 'actions',
            component: actions
        },
        {
            path: '/actions/:actionNumber',
            name: 'action_details',
            component: action_details
        },
        {
            path: '/participations',
            name: 'participations',
            component: participations
        },
        {
            path: '/participations/:participationNumber',
            name: 'participation_details',
            component: participation_details
        },
        {
            path: '/participationsByAction/:actionNumber',
            name: 'participationsByAction',
            component: participations
        },

    ]
})

07 Mar
3 months ago

mostafalaravel left a reply on Seed Error : Array To String Conversion ...

@BESTMOMO - yes , thanks

 $faker->words(7,true)      ,

mostafalaravel started a new conversation Seed Error : Array To String Conversion ...

Hello ,

this is my seed class bellow , when I run :

php artisan db:seed --class=Action_detailsTableSeeder

it returns me :


Array to string conversion (SQL: insert into action_details (action_number, nofab, nofac_description, action_name, startdate, enddate, extensiondate, is_cashback, minimum_value, maximum_value, is_expedition, action_type, action_descr iption_nl, action_description_fr, action_po_box, generic_brand, detailed_brand, distribution_1, distribution_2, nielsen_1, nielsen_2, nielsen_3, extract_communication_fr, extract_communictation_nl, delete_byte, view_participations, export_participations, view_statistics, export_statistics, status, clearing, bon_number, emission_quantity, estimated_redemption, redemption_to_date, dr_reference, vat_rate, hon_reference, first_coupon_date, briefing_date, productio n_date, action_fed, web_url) values (20868, 47312, omnis, ratione, 20190307, 20190308, 20190310, Rye, 6, 26, Melton West, est, aut, tempore, 66273-6978, Muller-Bashirian, incidunt, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, Melton West, xx, not dispo nible, xx, xx, 20190309, xx, xxx, xxx, 20190306, 20190307, 20190307, xx, http://jaskolski.info/))

<?php

use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Faker\Factory as Faker;


class Action_detailsTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $faker = Faker::create();
        foreach (range(1, 1) as $index) {
            DB::table('action_details')->insert([
                    'action_number' => rand(10000,99999)      ,
                    'nofab' => rand(10000,99999)     ,
                    'nofac_description' => $faker-> words(5)     ,
                    'action_name' => $faker->word(3)      ,
                    'startdate' => date('Ymd')      ,
                    'enddate' => date('Ymd', strtotime("+1 day"))     ,
                    'extensiondate' => date('Ymd', strtotime("+3 day"))      ,
                    'is_cashback' => $faker->randomElement(['Melton South','Melton West','Rye'])   ,
                    'minimum_value' => rand(1,10)     ,
                    'maximum_value' => rand(20,30)      ,
                    'is_expedition' => $faker->randomElement(['Melton South','Melton West','Rye'])     ,
                    'action_type' => $faker->word(6)      ,
                    'action_description_nl' => $faker->words(5)      ,
                    'action_description_fr' => $faker->words(6)      ,
                    'action_po_box' => $faker->postcode      ,
                    'generic_brand' => $faker->company      ,
                    'detailed_brand' => $faker->words(7)     ,
                    'distribution_1' => 'xx'     ,
                    'distribution_2' => 'xx'     ,
                    'nielsen_1' => 'xx'     ,
                    'nielsen_2' => 'xx'     ,
                    'nielsen_3' => 'xx'     ,
                    'extract_communication_fr' => 'xx'      ,
                    'extract_communictation_nl' => 'xx'     ,
                    'delete_byte' => 'xx'      ,
                    'view_participations' => 'xx'     ,
                    'export_participations' => 'xx'     ,
                    'view_statistics' => 'xx'     ,
                    'export_statistics' => 'xx'     ,
                    'status' => $faker->randomElement(['Melton South','Melton West','Rye'])      ,
                    'clearing' => 'xx'     ,
                    'bon_number' => 'not disponible'      ,
                    'emission_quantity' =>'xx'      ,
                    'estimated_redemption' => 'xx'      ,
                    'redemption_to_date' => date('Ymd', strtotime("+2 day"))     ,
                    'dr_reference' => 'xx'      ,
                    'vat_rate' => 'xxx'   ,
                    'hon_reference' => 'xxx'      ,
                    'first_coupon_date' => date('Ymd', strtotime("-1 day"))      ,
                    'briefing_date' => date('Ymd', strtotime("+0 day"))      ,
                    'production_date' => date('Ymd', strtotime("+0 day"))     ,
                    'action_fed' => 'xx'     ,
                    'web_url' => $faker->url
                ]);

        }
    }
}

06 Mar
3 months ago

mostafalaravel left a reply on How To Use V-if Inside V-for

@MUSHOOD - Thanks it works :) but how to do if I want to apply the filter even when the contains the string "date" like : "startdate" or "enddate" or "birth_date" ...

mostafalaravel started a new conversation How To Use V-if Inside V-for

hello ,

I would like to check if the item key inside the v-for contains the term 'date' then to apply date filter on the value.

            <tr v-for="(item,index,i) in actionDetails">
                <td class="p-1 w-px border-t border-grey-light font-mono text-xs text-purple-dark whitespace-no-wrap">{{actionRowsLabels[i]}}</td>
                <td class="p-1 border-t border-grey-light font-mono text-xs text-blue-dark whitespace-pre">{{item}}</td>
            </tr>

something like: if the index value is "startdate" I will make a filter "| moment('DD/MM/YYYY') ..."

thanks

05 Mar
3 months ago

mostafalaravel left a reply on Vue Router Not Working

Now the error becomes

Uncaught TypeError: Cannot set property 'app' of undefined
    at VueRouter 

mostafalaravel left a reply on Vue Router Not Working

@TYKUS - no I have only one <router-view/> it was a problem in copy/past I correct it !

mostafalaravel started a new conversation Vue Router Not Working

Hello, I try to make router to my app , but I receive this error message :

[Vue warn]: Unknown custom element: <router-view> - did you register the component correctly? For recursive components, make sure to provide the "name" option.

found in

---> <App> at src/App.vue
       <Root>

here the App vue :

<template>
  <div id="app">
    <!--<HelloWorld msg="Welcome to Your Vue.js App"/>

    -->
    <router-view/>

  </div>
</template>

<script>

import './assets/css/main.css'

export default {
  name: 'app'
}
</script>

<style>
#app {
}
</style>

````
main.js : 
````
<template>
  <div id="app">
    <!--<HelloWorld msg="Welcome to Your Vue.js App"/>

    -->
    <router-view/>

  </div>
</template>

<script>

import './assets/css/main.css'

export default {
  name: 'app'
}
</script>

<style>
#app {
}
</style>
````
Thanks

mostafalaravel started a new conversation How To Add Existing VUE Project To Laravel ?

Hello,

I have my current Vue project in development mode and I would like to add it on laravel project at "/vue" root.

what's the best way to do that ?

Thanks

04 Mar
3 months ago

mostafalaravel started a new conversation Unknown Custom Element: <paginate>

Hello ,

I installed vuejs-paginate :

https://www.npmjs.com/package/vuejs-paginate

but I have this error message :

[Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.

main.js

import Vue from 'vue'
import App from './App.vue'
import axios from 'axios'
import VueAxios from 'vue-axios'

Vue.config.productionTip = false

new Vue({
  render: h => h(App),
}).$mount('#app')

Vue.use(VueAxios, axios)
Vue.use(require('vue-moment'))

import Paginate from 'vuejs-paginate'
Vue.component('paginate', Paginate)

my component template :


            <paginate
                    :page-count="20"
                    :page-range="3"
                    :margin-pages="2"
                    :click-handler="clickCallback"
                    :prev-text="'Prev'"
                    :next-text="'Next'"
                    :container-class="'pagination'"
                    :page-class="'page-item'">
            </paginate>

App.vue

<script>
//import HelloWorld from './components/HelloWorld.vue'
import actions from './components/actions.vue'
import './assets/css/main.css'


export default {
  name: 'app',
  components: {
    //HelloWorld,
    actions

  }
}
</script>

thanks

03 Mar
3 months ago

mostafalaravel started a new conversation Change The Object Attribute Value In V-for Loop .

Hello,

here the template :

            <tr>

                <td colspan="16">
                    <div class="px-3 py-2">
                        <span  v-for="(val,key) in actionFilterContent" v-if="val !== null" v-on:click="val = null"><span class="text-xs text-green-darkest">{{val}}</span> </span>
                    </div>
                </td>

            </tr>

actionFilterContent :

actionFilterContent : {
                    "group": null,
                    "status": null,
                    "action_name": null,
                    "action_number": null,
                    "action_po_box": null,
                    "nofab_description": null,
                    "brand": null,
                    "action_description_nl": null,
                    "action_description_fr": null,
                    "action_description_en": null,
                    "action_type": null,
                    "is_cashback": null,
                    "is_expedition": null,
                    "startdate": null,
                    "enddate": null,
                    "extentiondate": null
                },

Question is : how to when I click on the span tag I change actionFilterContent to null ?

thanks

mostafalaravel started a new conversation How To Avoid Repetition Of Css Classes In Template ?

hello

how to replace all those repeated css classes in template by just one like "my-th" witch contains all those classes ?

<th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest"><input class=" rounded py-2 px-3 text-grey-darker " type="text" placeholder="group" v-model="actionFilterContent.group" v-on:keyup.13="actionFilter()"></th>
                <th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest"><input class=" rounded py-2 px-3 text-grey-darker " type="text" placeholder="status"  v-model="actionFilterContent.status" v-on:keyup.13="actionFilter()"></th>
                <th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest"><input class=" rounded py-2 px-3 text-grey-darker " type="text" placeholder="action_name"></th>
                <th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest"><input class=" rounded py-2 px-3 text-grey-darker " type="text" placeholder="action_number"></th>
                <th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest"><input class=" rounded py-2 px-3 text-grey-darker " type="text" placeholder="action_po_box"></th>
                <th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest"><input class=" rounded py-2 px-3 text-grey-darker " type="text" placeholder="nofab_description"></th>
                <th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest"><input class=" rounded py-2 px-3 text-grey-darker " type="text" placeholder="brand"></th>
                <th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest"><input class=" rounded py-2 px-3 text-grey-darker " type="text" placeholder="action_description_nl"></th>
                <th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest"><input class=" rounded py-2 px-3 text-grey-darker " type="text" placeholder="action_description_fr"></th>
                <th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest"><input class=" rounded py-2 px-3 text-grey-darker " type="text" placeholder="action_description_en"></th>
                <th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest"><input class=" rounded py-2 px-3 text-grey-darker " type="text" placeholder="action_type"></th>
                <th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest"><input class=" rounded py-2 px-3 text-grey-darker " type="text" placeholder="is_cashback"></th>
                <th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest"><input class=" rounded py-2 px-3 text-grey-darker " type="text" placeholder="is_expedition"></th>
                <th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest"><input class=" rounded py-2 px-3 text-grey-darker " type="text" placeholder="startdate"></th>
                <th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest"><input class=" rounded py-2 px-3 text-grey-darker " type="text" placeholder="enddate"></th>
                <th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest"><input class=" rounded py-2 px-3 text-grey-darker " type="text" placeholder="extentiondate"></th>

My scoped CSS is empty :

<style scoped>

</style>

mostafalaravel left a reply on How To Use V-for With V-modal

@KEL_ - could you tell me how to prevent repeating css classes ?

<style scoped>

</style>

mostafalaravel started a new conversation How To Use V-for With V-modal

Hello ,

here my template for table

                <th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest"><input class=" rounded py-2 px-3 text-grey-darker " type="text" placeholder="group" v-model="actionFilterContent.group" v-on:keyup.13="actionFilter()"></th>
                <th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest"><input class=" rounded py-2 px-3 text-grey-darker " type="text" placeholder="status"  v-model="actionFilterContent.status" v-on:keyup.13="actionFilter()"></th>
                <th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest"><input class=" rounded py-2 px-3 text-grey-darker " type="text" placeholder="action_name"></th>
                <th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest"><input class=" rounded py-2 px-3 text-grey-darker " type="text" placeholder="action_number"></th>
                <th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest"><input class=" rounded py-2 px-3 text-grey-darker " type="text" placeholder="action_po_box"></th>
                <th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest"><input class=" rounded py-2 px-3 text-grey-darker " type="text" placeholder="nofab_description"></th>
                <th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest"><input class=" rounded py-2 px-3 text-grey-darker " type="text" placeholder="brand"></th>
                <th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest"><input class=" rounded py-2 px-3 text-grey-darker " type="text" placeholder="action_description_nl"></th>
                <th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest"><input class=" rounded py-2 px-3 text-grey-darker " type="text" placeholder="action_description_fr"></th>
                <th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest"><input class=" rounded py-2 px-3 text-grey-darker " type="text" placeholder="action_description_en"></th>
                <th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest"><input class=" rounded py-2 px-3 text-grey-darker " type="text" placeholder="action_type"></th>
                <th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest"><input class=" rounded py-2 px-3 text-grey-darker " type="text" placeholder="is_cashback"></th>
                <th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest"><input class=" rounded py-2 px-3 text-grey-darker " type="text" placeholder="is_expedition"></th>
                <th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest"><input class=" rounded py-2 px-3 text-grey-darker " type="text" placeholder="startdate"></th>
                <th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest"><input class=" rounded py-2 px-3 text-grey-darker " type="text" placeholder="enddate"></th>
                <th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest"><input class=" rounded py-2 px-3 text-grey-darker " type="text" placeholder="extentiondate"></th>

the data ()

        data() {
            return {
                msg: ' from msg variable',
                actionFilterContent : {
                    "group": "",
                    "status": "",
                    "action_name": "",
                    "action_number": "",
                    "action_po_box": "",
                    "nofab_description": "",
                    "brand": "",
                    "action_description_nl": "",
                    "action_description_fr": "",
                    "action_description_en": "",
                    "action_type": "",
                    "is_cashback": "",
                    "is_expedition": "",
                    "startdate": "",
                    "enddate": "",
                    "extentiondate": ""
                },
                actionsList: [],
            }
        },

How to use for loop to prevent repeating the same lines in the template ? (all cols are in actionFilterContent )

thanks

01 Mar
3 months ago

mostafalaravel started a new conversation Laravel Socialite GITLAB

Hello

I would like to connect with GitLab account to my app, could you please help me ?

Thanks

28 Feb
3 months ago