mitismirza

mitismirza

Member Since 10 Months Ago

Birjand

Experience Points 1,440
Experience Level 1

3,560 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 0
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.

08 Feb
3 months ago

mitismirza started a new conversation How To Customize Laravel5.7 Email Verfication Template

hey guys.

how can i customize laravel5.7 email verfication template ?

https://laravel.com/docs/5.7/verification

17 Jan
4 months ago

mitismirza left a reply on Search And Replace Strings With Space In Php

problem solved , my mistake was in spaces in search word.

mitismirza left a reply on Search And Replace Strings With Space In Php

@REALRANDYALLEN - thanks for replay.

this is my code :


    // delete from .conf file
   // for example $survey_queue is 8001
    $res  = $conn->query("SELECT * FROM settings WHERE id = $id");
    $row  = $res->fetch_assoc();
    $survey_queue = $row['survey_queue'];
    $conf  = "[$survey_queue](+)
    setinterfacevar=yes
    ";
    $path_to_file = '../../etc/queues_post_custom.conf';
    $file_contents = file_get_contents($path_to_file);
    $file_contents = str_replace("$conf","",$file_contents);
    file_put_contents($path_to_file,$file_contents);

and this is the queues_post_custom.conf

queues_post_custom

and its content when i echo the content:

echo $file_contents;
 //is:
[8020](+) setinterfacevar=yes [8021](+) setinterfacevar=yes [8022](+) setinterfacevar=yes [8024](+) setinterfacevar=yes [8001](+) setinterfacevar=yes [8005](+) setinterfacevar=yes 

thanks.

16 Jan
4 months ago

mitismirza started a new conversation Search And Replace Strings With Space In Php

hey guys, i have this strign

 [8019](+) setinterfacevar=yes [8020](+) setinterfacevar=yes [8021](+) setinterfacevar=yes [8022](+) setinterfacevar=yes 

for example i want to search this:

[8019](+) setinterfacevar=yes

and delete it.

i use str_replace for find and replace it with '' but it doesnot find "8019 setinterfacevar=yes" and it can just find "8019" or "setinterfacevar=yes".

i test strpos but it is do the same.

how can i do that? thanks.

08 Jan
4 months ago

mitismirza left a reply on Is There Any Way To Search On Encrypted Data On Database

@DOUGLASAKULA - thank i think i have to don't use encryption in this case.

mitismirza started a new conversation Is There Any Way To Search On Encrypted Data On Database

hi guys,

i encrypted my user acount balance with Crypt::encryptString($balance) and for show it using Crypt::decryptString($request->balance) .

but for searching on users balances i don't know what to do , because the encrypted string of 18$ is different with 18$ of another user.

is there anyway to search on encrypted data?

Or Beter Question is , is nesseary that i encrypt user balance acount ? Or is there better way to secure it , without encrypting?

thanks.

06 Jan
4 months ago

mitismirza left a reply on How To Install Laravel Package On Cpanel

@MUSA11971 - thanks , yes in fact is a hard pain.

mitismirza left a reply on How To Install Laravel Package On Cpanel

yes your right , thanks for replay.

mitismirza left a reply on How To Install Laravel Package On Cpanel

thanks , i know that but on cpanel , how can i do that?

mitismirza started a new conversation How To Install Laravel Package On Cpanel

hey guys.

i deployed my laravel project on cpanel shared hosting. and i'm still developing it and uploading my changes. but now i add a package to my project and upload my package and its dependencies in vendor also updated the composer.json , composer.lock.json and autoload.php in vendor but in config/app.php when i call the provider and alliases my whole site is down.

what do you think should i do instead of upload entire the project?

thanks.

23 Dec
4 months ago

mitismirza left a reply on Best Way To Manage Data Before And After Payment

@DOUGLASAKULA - thanks alot , i'm thinking send a token with rollback url , it has to be the best way for me.

but another question and sorry for my many long questions.

how can i make a token?

mitismirza left a reply on Best Way To Manage Data Before And After Payment

@DOUGLASAKULA - thanks dud , its so better .

but i'm thinking is there any way that i don't use any sessions?

can any one tell me is that possible?

mitismirza started a new conversation Best Way To Manage Data Before And After Payment

hey guys,

i programmed an online food reservation system. when user reserve foods i store them into a session and after payment i retrive the stored session , but it seams sometimes not working correctly and i think its maybe because of huge session data stored .

i don't know why is happend , maybe my customer old browser version , maybe list of foods was so long and its not working very well on session , but its not working sometimes.

what i have to do for managing foods data before and after payment? what do you suggest?

thanks.

21 Dec
4 months ago

mitismirza started a new conversation Raw Expression In Simple Php And Mysql

hey guys,

i wirte this code in laravel before :


DB::table('survey')
                ->where('date_time', '>=' , $from[$i] )->where('date_time' , '<=' , $to[$i] )
                ->groupBy('survey_location')
                ->select( 'survey_location'   , DB::raw('SUM(survey_value) as total_survey , AVG(survey_value) as average_survey , COUNT(agent_number) as count_survey' ))
                ->get();

but now i want to write it in simple php and mysql , can anybody help me?

16 Dec
5 months ago

mitismirza left a reply on Mcrypt Extension For Wamp Or Xampp

@TISUCHI - thanks for replay .

the problem is i have not extension=php_mcrypt.dll in my php.ini i have not php_mcrypt.dll in my etc folder . i install wamp and xampp with php 5.4 or with php 7.2 but none of them haven't the mcrypt that i can activate it.

wich version of xampp or wamp or lamp have mcrypt for default wich i will install.

mitismirza started a new conversation Mcrypt Extension For Wamp Or Xampp

hey guys.

i want to work with laravel 5.0 because my customer php server is 5.4 i install wamp 2.4 with php 5.4.12 but it have not mcrypt , i google to how install mcrypt on wamp whole day , but unfortunately i couldn't add it to wamp.

any one install mcrypt on wamp or xampp before? any one can help me how to do it? all instruction that i google doesn't work.

thanks.

mitismirza left a reply on Laravel Collect In Php

@VILFAGO - thanks VILFAGO

mitismirza left a reply on Laravel Collect In Php

@VILFAGO - thanks for replay VILFAGO

but how can i create somthing like this:


$persons  =  collect([
    'name'   => 'John' , 
    'family'  => 'jeferson',
    'age'       =>  26
]);

mitismirza started a new conversation Laravel Collect In Php

hey guys. is there replace for laravel collect in php? i mean how can i do this in php? $persons = collect([ 'name' => 'John' , 'family' => 'jeferson', 'age' => 26 ]); thanks.

21 Oct
6 months ago

mitismirza started a new conversation Voyager Rtl Problem

hey guys, did you work with voyager package? its awesome but in rtl version it have some problems. please see this issue and if you can pleeeease help me. https://github.com/the-control-group/voyager/issues/3655

06 Aug
9 months ago

mitismirza left a reply on Somthing Like Gravityforms In Laravel

@jlrdw yes i have your point too , but i want my client can easy create forms and use it.

@lostdreamer_nl i know laravel is not content management system and i do not mean that , i want a form builder that client can use it and make his own forms for his clients and recieve their answers , registrations and ...

@click wow this is greate , i saw https://formbuilder.online/ before but this is too much more complete , if i want to integrate a javascript form builder to laravel absolutely use this.

thanks so much guys.

mitismirza started a new conversation Somthing Like Gravityforms In Laravel

hey guys

do you know somthing like gravityforms that user can build applications in laravel?

https://www.gravityforms.com/

thanks .

04 Aug
9 months ago

mitismirza started a new conversation Drag And Drop Form Builder Package For Laravel

hey guys,

do you know any package for drag and drop form builder in laravel?

i'm designing a web site and one part off it is that admin user can simply create a form for

something like registration on front end or something else.

how can i implement it?

thanks.

24 Jul
9 months ago

mitismirza left a reply on Best Design Tool For Front-end

thanks guys .

i think i have to design with pwa for mobile devices

23 Jul
9 months ago

mitismirza left a reply on How To Upload Laravel On Plesk 12.0

the plesk is using apache and php and mysql

mitismirza started a new conversation How To Upload Laravel On Plesk 12.0

how can i upload laravel on plesk

its not recognizing my main files ( app,config,recourses , env ) i mean its not recognizing up

folder off public

how can i upload it?

mitismirza started a new conversation Laravel On Plesk

hey

on upload my laravel project on plesk control panel but its just showing blank page.

my laravel php version is 7.1

my plesk panel php version is 5.4

my php version is low but i it have to be show the website because i didn't use php7

commands.

i have subdomain as:

laravel.my-site.com

and the subdomain directory:

root/laravel/public

and i put the public files in it , and other files in root/laravel

but it showing the blank page.

what i have to do?

22 Jul
9 months ago

mitismirza left a reply on Email Template Mess When Forwarding It!

thanks @lostdreamer_nl

instead of using external css , i used inline css and its worked perfectly!

mitismirza started a new conversation Email Template Mess When Forwarding It!

hey

i have a form that submit some info and email it to a email , i write it with laravel.

when email recieved is ok and showing a simple template like this:

https://cdn.pbrd.co/images/HvBDcHL.png

but when i click on forward it will showing just texts and dismiss styles:

https://cdn.pbrd.co/images/HvBDIyU.png

this is my email blade that have styles :

<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="stylesheet" href="/css/bootstrap.min.css">
    <title>ایمیل </title>
    @include('min_style')
    <style>
        body{
            direction: rtl;
            font-size: 11px;
        }
    </style>
</head>

<body>
<h4 style="color: #1c7430;direction: rtl;text-align:right;"> شکایت جدید از طرف آقا/خانم {!! $info->pluck('name')->pop() !!} دریافت شد </h4>
<hr>

<table class="table " style="direction: rtl;  text-align: center;" >
    <thead class="thead-dark" style="direction: rtl;  text-align: center;">
    <tr style="direction: rtl;  text-align: center;">
        <th  style="direction: rtl;  text-align: center;" scope="col">موضع شکایت</th>
        <th  style="direction: rtl;  text-align: center;" scope="col">شرح شکایت یا تخلف</th>
        <th style="direction: rtl;  text-align: center;" scope="col">پیشنهاد جهت رفع مشکل</th>
        <th style="direction: rtl;  text-align: center;" scope="col">تلفن</th>
    </tr>
    </thead>
    <tbody>
    <tr>
        <th >{!! $info->pluck('moze_shekayat')->pop() !!}</th>
        <td>{!! $info->pluck('sharh_shekayat')->pop() !!}</td>
        <td>{!! $info->pluck('pishnahad')->pop() !!}</td>
        <td>{!! $info->pluck('phone')->pop() !!}</td>
    </tr>
    </tbody>
</table>

</body>
</html>

and the '@include(min_style)' blade have:

<style>
    /*! CSS Used from: Embedded */
    *,::after,::before{box-sizing:border-box;}
    body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:right;background-color:#fff;}
    hr{box-sizing:content-box;height:0;overflow:visible;}
    h4{margin-top:0;margin-bottom:.5rem;}
    table{border-collapse:collapse;}
    th{text-align:inherit;}
    h4{margin-bottom:.5rem;font-family:inherit;font-weight:500;line-height:1.2;color:inherit;}
    h4{font-size:1.5rem;}
    hr{margin-top:1rem;margin-bottom:1rem;border:0;border-top:1px solid rgba(0,0,0,.1);}
    .table{width:100%;max-width:100%;margin-bottom:1rem;background-color:transparent;}
    .table td,.table th{padding:.75rem;vertical-align:top;border-top:1px solid #dee2e6;}
    .table thead th{vertical-align:bottom;border-bottom:2px solid #dee2e6;}
    .table .thead-dark th{color:#fff;background-color:#212529;border-color:#32383e;}
    @media print{
        *,::after,::before{text-shadow:none!important;box-shadow:none!important;}
        thead{display:table-header-group;}
        tr{page-break-inside:avoid;}
        body{min-width:992px!important;}
        .table{border-collapse:collapse!important;}
        .table td,.table th{background-color:#fff!important;}
    }
    /*! CSS Used from: Embedded */
    body{direction:rtl;font-size:11px;}
</style>


what's happening when i click on forward whay styles mess!

mitismirza left a reply on Best Design Tool For Front-end

@Sergiu17 @jlrdw @webtrickshome

thanks guys.

for example when you design a web page in photoshop its awesome and you never get

that design in bootstrap or somthing else.

this is some examples of my designs and im ok with it:

https://cdn.pbrd.co/images/HvBf442.jpg

https://cdn.pbrd.co/images/HvBfizC.png

https://cdn.pbrd.co/images/HvBfpva.png

but my problem is how to making it responsive?

21 Jul
9 months ago

mitismirza started a new conversation Best Design Tool For Front-end

hi

for front-end design i little work with Adobe Muse And its good And I want to learn it more ,

but before that i want to know what do you think about? is it the perfect tool for design a

cms front-end or is there easier and professional way or tool ?

what do you suggest?

16 Jul
10 months ago

mitismirza started a new conversation Package For Import Posts From Wordpress To Laravel

hi

if i have table like posts in wordpress , is there package to import posts from wordpress to

laravel that really work fine?

mitismirza started a new conversation Insert Post From Another Website To My DataBase Database Connection

hey guys

is it possible insert post from another websites to my database when they insert it , without any database connection or webservices?

for example when https://www.usatoday.com/news/ insert news i want to have it in mysite .

or when in another site a user submit a form the form also submit to my site either.

15 Jul
10 months ago

mitismirza left a reply on Uninstall Vmware But Still Port 80 Blocked

@MaverickChan @MarkLL @Tray2 thanks guys , i uninstall xampp and install it again ,

its working perfectly :|

mitismirza left a reply on Uninstall Vmware But Still Port 80 Blocked

@MaverickChan I check the IIS its not enabled.

i just install vmware workstation and it blocked my apache :|

i uninstalled it but it didn't fixed.

14 Jul
10 months ago

mitismirza started a new conversation Unistall Vmware But Still Port 80 Blocked

hi

after installing vmware my port blocked and apache stop working...

i unistall it but apchace still not working and say:


Error: Apache shutdown unexpectedly.
01:18:39 ق.ظ  [Apache]  This may be due to a blocked port, missing dependencies, 
01:18:39 ق.ظ  [Apache]  improper privileges, a crash, or a shutdown by another method.
01:18:39 ق.ظ  [Apache]  Press the Logs button to view error logs and check
01:18:39 ق.ظ  [Apache]  the Windows Event Viewer for more clues
01:18:40 ق.ظ  [Apache]  If you need more help, copy and post this
01:18:40 ق.ظ  [Apache]  entire log window on the forums


mitismirza left a reply on Problem When Using Sync With 3 Intermediate Column

now I go it , thanks so much.

mitismirza left a reply on Laravel Heavy Pagination

thanks guys i check it.

mitismirza started a new conversation Laravel Heavy Pagination

hi i put 1 million record in database and paginate it with any relation :

    public function index(){
        $phones = Phone::latest()->paginate(10);
        return view('phones' , compact('phones') );
    }

and show it in blade:


                <tbody>
                @foreach($phones as $phone)
                    <tr style="max-width: 1024px;">
                        <th scope="row">{{ $phone->id }}</th>
                        <th scope="row">{{ $phone->name }}</th>
                        <th scope="row">{{ $phone->price }}</th>
                        <th scope="row">{{ $phone->date }}</th>
                        <th scope="row">{{ $phone->created_at }}</th>
                        <th scope="row">{{ $phone->updated_at }}</th>
                    </tr>
                @endforeach
                </tbody>
            </table>
            <div style="text-align:center;">
                {{ $phones->links() }}
            </div>

it paginate it and show pagination as well , but the problem is when i want paginate to latest pages it will show the page with 40 second delay!

but https://www.adminer.org/ have one page php that can connect very simply to database and retrieve one trillion and its last pages in 1 second!

what i should to do to take down the delay time to 1 second?

13 Jul
10 months ago

mitismirza left a reply on Problem When Using Sync With 3 Intermediate Column

sorry i'm confused , can you please explain it little more . how can i define a model for each combination of food and index ?

12 Jul
10 months ago

mitismirza left a reply on Problem When Using Sync With 3 Intermediate Column

please look this:

https://cdn.pbrd.co/images/Hua6IB6.jpg

this is my plan form that user can choose any of foods for any of meal of day at the week.

the index_id is the meal of day in the week , that i identify wich foods of this plan are from wich meal.

for example :

Saturday have 3 meal with ( breakfast: index_id => 0 , lunch : index_id =>1 , dinner :

index_id=>2 )

Sunday have 3 Meal ( breakfast: index_id => 3 , lunch : index_id =>4 , dinner :

index_id=>5 )

And So On...

So maybe each index have same food with another index in the same plan_id. :(

I know I didn't design it very well.

what should i do for better design or what can do now? what do you suggest?

and one more question , How Do I have a better analyse from my project and its

database to don't going to miss such a problem.

mitismirza left a reply on How To Improve This "update Or Do Nothing"

I don't know its work or its not ugly :D but its another way if work

if(PageVersion::find($id)->pluck('path') == $request->getParam('path')){
    message('error', 'Version path already exists in another page.');
}else{
    PageVersion::find($id)->update([
        'path'  =>  $request->getParam('path') ,
        'name'  =>  $request->getParam('name') , 
        'notes' =>  $request->getParam('notes')
    ]);
    message('info', 'Version was updated!');
}

mitismirza left a reply on Problem When Using Sync With 3 Intermediate Column

your array works perfectly. but my problem is not solved yet :( I find out whay it says duplicate items , it say it because its not allow me to insert two same food_id with different indexes and same plan_id.

but i want to insert same plan ids with same food ids with different indexes like this :

plan_id=1 , food_id=1 , index_id=0
plan_id=1 , food_id=3 , index_id=0
plan_id=1 , food_id=4 , index_id=0
plan_id=1 , food_id=3 , index_id=3
plan_id=1 , food_id=1 , index_id=3

how can i do this?

mitismirza left a reply on Problem When Using Sync With 3 Intermediate Column

thanks @bobbybouwmann the code:

$plan->food()->sync([$food_id => ['index_id' => $index]]);

its work but as you said its just update one record.

and this code:

// Assuming $foods contains a collection of food models
$index = 2;
$syncArray = [];

foreach ($foods as $food) {
    $syncArray[$food->id] = ['index_id' => $index];
}

$plan->food()->sync($syncArray);

return this error:

    "message": "SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1-1-0' for key 'PRIMARY' (SQL: update `food_plan` set `index_id` = 0 where `plan_id` = 1 and `food_id` = 1)",

and the $syncArray content template before sync is:

{"2":{"index_id":9},"3":{"index_id":9}}

thanks for helping.