mitismirza

Experience

790

0 Best Reply Awards

  • Member Since 3 Months Ago
  • 0 Lessons Completed
  • 0 Favorites

6th August, 2018

mitismirza left a reply on Somthing Like Gravityforms In Laravel • 2 months ago

@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 • 2 months ago

hey guys

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

https://www.gravityforms.com/

thanks .

4th August, 2018

mitismirza started a new conversation Drag And Drop Form Builder Package For Laravel • 2 months ago

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.

24th July, 2018

mitismirza left a reply on Best Design Tool For Front-end • 2 months ago

thanks guys .

i think i have to design with pwa for mobile devices

23rd July, 2018

mitismirza left a reply on How To Upload Laravel On Plesk 12.0 • 2 months ago

the plesk is using apache and php and mysql

mitismirza started a new conversation How To Upload Laravel On Plesk 12.0 • 2 months ago

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 • 2 months ago

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?

22nd July, 2018

mitismirza left a reply on Email Template Mess When Forwarding It! • 2 months ago

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! • 2 months ago

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 • 2 months ago

@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?

21st July, 2018

mitismirza started a new conversation Best Design Tool For Front-end • 2 months ago

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?

17th July, 2018

16th July, 2018

mitismirza started a new conversation Package For Import Posts From Wordpress To Laravel • 2 months ago

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 • 3 months ago

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.

15th July, 2018

mitismirza left a reply on Uninstall Vmware But Still Port 80 Blocked • 3 months ago

@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 • 3 months ago

@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.

14th July, 2018

mitismirza started a new conversation Unistall Vmware But Still Port 80 Blocked • 3 months ago

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 • 3 months ago

now I go it , thanks so much.

mitismirza left a reply on Laravel Heavy Pagination • 3 months ago

thanks guys i check it.

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

any way , thanks man.

mitismirza started a new conversation Laravel Heavy Pagination • 3 months ago

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?

13th July, 2018

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

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

12th July, 2018

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

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" • 3 months ago

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 • 3 months ago

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 • 3 months ago

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.

mitismirza started a new conversation When Using Sync It Says 'index_id' Doesn't Have A Default Value • 3 months ago

hey everyone i have problem when sync my intermediate table.

this is my migrations: foods migration:

                Schema::create('foods', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');
            $table->double('price')->default(4000);
            $table->double('no_supsidy_price')->default(4000);
            $table->integer('likes')->default(0);
            $table->string('image')->default('foods/food.jpg');
            $table->timestamps();
        });

this is my plans migration:

        Schema::create('plans', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name'); // plan name for example ramazan plan
            $table->timestamps();
        });

and this is my intermediate table that placed in foods migration:

        Schema::create('food_plan', function (Blueprint $table) {
            $table->integer('food_id')->unsigned();
            $table->foreign('food_id')->references('id')->on('foods')->onDelete('cascade');
            $table->integer('plan_id')->unsigned();
            $table->foreign('plan_id')->references('id')->on('plans')->onDelete('cascade');
            $table->tinyInteger('index_id')->unsigned()->length(3); // meal of week 0 to 20
            $table->primary(['plan_id','food_id', 'index_id']);
        });

i set the 'plan_id' , 'food_id' , 'index_id' primary because it should be unique. and all relations between Food and Plan Model Are belongsToMany : Plan Model:

    public function food(){
        return $this->belongsToMany(Food::class)->withPivot('index_id');
    }

Food Model:

    public function plan(){
        return $this->belongsToMany(Plan::class);
    }

when i attach them its work perfectly:

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

and for example this is my attached foods:

https://pasteboard.co/Hu4lE8d.png

$food_id have array of foods and plan have one plan id and index have one index id.

when i run this , its say:

"message": "SQLSTATE[HY000]: General error: 1364 Field 'index_id' doesn't have a default value (SQL: insert into `food_plan` (`food_id`, `plan_id`) values (2, 3))",

but if i say:

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

it will work without error but the result is not good. it will delete all intermediate recored and just save one record.

what do you think i have to do?

please help.

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.