AwadGorg

AwadGorg

Member Since 8 Months Ago

Experience Points
3,220
Total
Experience

1,780 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 Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    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 Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

Level 1
3,220 XP
May
19
1 week ago
Activity icon

Replied to Sending Mails Using Laravel Mailable In Roundcube Mails

it was just mistyping from my end already update the question with the currect value

Activity icon

Started a new Conversation Sending Mails Using Laravel Mailable In Roundcube Mails

hello, am building this contact us system and my hosting has provided me with Roundcube as my mail client and they provided me with this info

Username:	[email protected]
Password:	Use the email account's password.
Incoming Server:	mail.mnstalryadh.com
IMAP Port: 993 POP3 Port: 995
Outgoing Server:	mail.mnstalryadh.com
SMTP Port: 587 
IMAP, POP3, and SMTP require authentication.

and this is the .env file

MAIL_DRIVER=smtp
MAIL_HOST=mail.mnstalryadh.com
MAIL_PORT=587
[email protected]
MAIL_PASSWORD=*************
MAIL_ENCRYPTION=null

and this is the error am getting from the browser

Swift_TransportException
Connection to mail.mnstalryadh.com:587 Timed Out
May
17
2 weeks ago
Activity icon

Replied to Limit User Activate Peer Day

thanks mate this fixed my issue thanks a lot

$store = auth('admin')->user()->vendor;
if ($store->type == 1) {
      if (Product::where('vendor_id', $store->id)->whereDate('created_at', $current_date)->count() >= 3) {
      	return $this->responseRedirectBack('لقد وصلت الى الحد المسموح بة للمنتجات ليوم واحد ارجا الانتظار الى يوم غد او تحديث الاشتراكك الى النسخة الذهبية حيث عدد المنتجات المسموح بها يوما اكثر او يمكنك التحديث الى الحزمة
        البلاتينية حيث عدد المنتجات لليوم غير محدود ةالعديد من الميزات الاخرى للمزيد الرجاء الاتصال بنا عبر البريد او رقم الهاتف', 'error', true, true);
      }
    }elseif($store->type == 2){
      if (Product::where('vendor_id', $store->id)->whereDate('created_at', $current_date)->count() >= 20) {
      	return $this->responseRedirectBack('لقد وصلت الى الحد المسموح بة للمنتجات ليوم واحد ارجا الانتظار الى يوم غد او تحديث الاشتراكك الى النسخة الذهبية حيث عدد المنتجات المسموح بها يوما اكثر او يمكنك التحديث الى الحزمة
        البلاتينية حيث عدد المنتجات لليوم غير محدود ةالعديد من الميزات الاخرى للمزيد الرجاء الاتصال بنا عبر البريد او رقم الهاتف', 'error', true, true);
      }
    }
May
15
2 weeks ago
Activity icon

Started a new Conversation Limit User Activate Peer Day

Hello, I want to make this limitation system for a multi-vendor store I want to allow free vendor account to be able to upload 3 products per day let's say that today is 15/05/2020 and the user already uploaded 3 products to the site and tried to upload the fourth product it should return an error that you already reach your range, now all of my products are linked to a specific vendor with vendor_id, and also all product has created_at row I want to count all products that been uploaded today by this vendor using vendor_id of course and if the result of the count is 3 return an error else upload the product.

now how can I change the above logic to code and thanks a lot for the help

May
06
3 weeks ago
Activity icon

Replied to Set Data Return From Foreach Loop To An Array

cuz I want the user to be able to filter data using more than one category but changed my mind now i just made it filter with only one category

May
05
3 weeks ago
Activity icon

Started a new Conversation Set Data Return From Foreach Loop To An Array

Hello, I want to build this filtering system and I have a problem, this is the code am, using

foreach ($request as $key => $cat_id) {
        $getProducts = Product::leftjoin('product_categories','product_categories.product_id', 'products.id')
        ->where('product_categories.category_id', $cat_id)->select('products.*')->paginate(20);
        $filteredProducts[] = $getProducts;
      }
      return $filteredProducts;

right now the becouse am using laravel elqouent it return an error

Undefined property: Illuminate\Pagination\LengthAwarePaginator::$images 

like with the code above laravel elqouent not working, so I've changed it to this

foreach ($request as $key => $cat_id) {
        $getProducts = Product::leftjoin('product_categories','product_categories.product_id', 'products.id')
        ->where('product_categories.category_id', $cat_id)->select('products.*')->paginate(20);
      }
      return $getProducts;

with the code right above the Undefined property error is fixed but now it only returns only one element from the foreach, how can i fix this if i choose to use joins i will have to make so many joins to replace elqouent is there anyway that I can do this without returning to joining tables cuz there are many tables, and thanks for the help.

Apr
30
1 month ago
Activity icon

Replied to How To Make A Bank Transfer System In Laravel

am using stripe I want to build multi vendors store and want the money to go to the store owner when a customer buys from his store

Apr
29
1 month ago
Activity icon

Started a new Conversation How To Make A Bank Transfer System In Laravel

Hello, I want to ask if there any laravel library or extension that's all making banking transfer cuz am working on eCommerce website and i want to make bank transfer as a way of paying. and thanks

Apr
22
1 month ago
Activity icon

Started a new Conversation Get Data From A Database Table If This Data Doesn't Have A Value On Other Table

Hello, I have 2 tables vendors table and admins table the vendor table is linked with the admin table with every vendor have an admin I want to show admins that haven't been assigned to a vendor yet, get all admins that don't have a row on the vendor's table there is a row on the vendor table called admin_id that links the vendor to an admin, hope I made it clear and thanks for your help

Apr
21
1 month ago
Activity icon

Replied to Can't Get The Id Of The User Logged In From The Admin Table Using Auth

thanks, mate now everything is working perfectly

Apr
20
1 month ago
Activity icon

Started a new Conversation Can't Get The Id Of The User Logged In From The Admin Table Using Auth

Hello I have admin table other than the user's table and to avoid any conflict I edited the auth.php file like this

'guards' => [
        'web' => [
            'driver' => 'session',
            'provider' => 'users',
        ],

        'api' => [
            'driver' => 'token',
            'provider' => 'users',
            'hash' => false,
        ],
        'admin' => [
            'driver' => 'session',
            'provider' => 'admins',
        ],

        'admin-api' => [
            'driver' => 'token',
            'provider' => 'admins',
            'hash' => false,
        ],
    ]

and

'providers' => [
        'users' => [
            'driver' => 'eloquent',
            'model' => App\Models\User::class,
        ],
        'admins' => [
            'driver' => 'eloquent',
            'model' => App\Models\Admin::class,
        ],

        // 'users' => [
        //     'driver' => 'database',
        //     'table' => 'users',
        // ],
    ],

and

'passwords' => [
        'users' => [
            'provider' => 'users',
            'table' => 'password_resets',
            'expire' => 60,
            'throttle' => 60,
        ],
        'admins' => [
            'provider' => 'users',
            'table' => 'password_resets',
            'expire' => 60,
            'throttle' => 60,
        ],
    ],

now i need the admin user id to asign it to one of my other tables but i couldn't get the id when i used

 $vendor_admin_id = Auth::user()->id;

nor

 $vendor_admin_id = Auth::admin()->id;

nor

 $vendor_admin_id = Auth::id();

all of the above didn't work this is my login controller

<?php

namespace App\Http\Controllers\Admin;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
use Auth;
class LoginController extends Controller
{
    use AuthenticatesUsers;

    /**
     * Where to redirect admins after login.
     *
     * @var string
     */
    protected $redirectTo = '/admin';

    /**
     * Create a new controller instance.
     *
     * @return void
     */
    public function __construct()
    {
        $this->middleware('guest:admin')->except('logout');
    }

    /**
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
     */
    public function showLoginForm()
    {
        return view('admin.auth.login');
    }
    /**
     * @param Request $request
     * @return \Illuminate\Http\RedirectResponse
     * @throws \Illuminate\Validation\ValidationException
    */
    public function login(Request $request)
    {
        $this->validate($request, [
            'email'   => 'required|email',
            'password' => 'required|min:6'
        ]);
        if (Auth::guard('admin')->attempt([
            'email' => $request->email,
            'password' => $request->password
        ], $request->get('remember'))) {
            return redirect()->intended(route('admin.dashboard'));
        }
        return back()->withInput($request->only('email', 'remember'));
    }
    /**
     * @param Request $request
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
     */
    public function logout(Request $request)
    {
        Auth::guard('admin')->logout();
        $request->session()->invalidate();
        return redirect()->route('admin.login');
    }
}

please help :)

Apr
19
1 month ago
Activity icon

Replied to Can't Reach The Components File To Print Changes On Screen

didn't get what you're trying to say as I said am learning can you explain more well be more than great and helpful for me to know where is my error and thanks for replying to my Question :)

Activity icon

Replied to Can't Reach The Components File To Print Changes On Screen

now it's given me this error after I deleted everything and wrote the code again from the begging

app.js:20698 [Vue warn]: Error compiling template:

Templates should only be responsible for mapping the state to the UI. Avoid placing tags with side-effects in your templates, such as <script>, as they will not be parsed.

71 |              </div>
72 |          </div>
73 |      </div>
   |             
74 |  <script src="http://localhost:8000/backend/js/app.js"></script></main>
   |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

(found in <Root>)
warn @ app.js:20698
(anonymous) @ app.js:31766
compileToFunctions @ app.js:31765
./node_modules/vue/dist/vue.common.dev.js.Vue.$mount @ app.js:31989
Vue._init @ app.js:25076
Vue @ app.js:25142
./resources/js/app.js @ app.js:32171
__webpack_require__ @ app.js:20
0 @ app.js:32254
__webpack_require__ @ app.js:20
(anonymous) @ app.js:84
(anonymous) @ app.js:87
app.js:20698 [Vue warn]: Unknown custom element: <attribute-values> - did you register the component correctly? For recursive components, make sure to provide the "name" option.

(found in <Root>)
Activity icon

Replied to Can't Reach The Components File To Print Changes On Screen

Yes

@extends('admin.app')
@section('title') {{ $pageTitle }} @endsection
@section('content')
    <div class="app-title">
        <div>
            <h1><i class="fa fa-cogs"></i> {{ $pageTitle }}</h1>
        </div>
    </div>
    @include('admin.partials.flash')
    <div class="row user">
        <div class="col-md-3">
            <div class="tile p-0">
                <ul class="nav flex-column nav-tabs user-tabs">
                    <li class="nav-item"><a class="nav-link active" href="#general" data-toggle="tab">General</a></li>
                    <li class="nav-item"><a class="nav-link" href="#values" data-toggle="tab">Attribute Values</a></li>
                </ul>
            </div>
        </div>
        <div class="col-md-9">
            <div class="tab-content">
                <div class="tab-pane active" id="general">
                    <div class="tile">
                        <form action="{{ route('admin.attributes.update') }}" method="POST" role="form">
                            @csrf
                            <h3 class="tile-title">Attribute Information</h3>
                            <hr>
                            <div class="tile-body">
                                <div class="form-group">
                                    <label class="control-label" for="code">Code</label>
                                    <input
                                        class="form-control"
                                        type="text"
                                        placeholder="Enter attribute code"
                                        id="code"
                                        name="code"
                                        value="{{ old('code', $attribute->code) }}"
                                    />
                                </div>
                                <input type="hidden" name="id" value="{{ $attribute->id }}">
                                <div class="form-group">
                                    <label class="control-label" for="name">Name</label>
                                    <input
                                        class="form-control"
                                        type="text"
                                        placeholder="Enter attribute name"
                                        id="name"
                                        name="name"
                                        value="{{ old('name', $attribute->name) }}"
                                    />
                                </div>
                                <div class="form-group">
                                    <label class="control-label" for="frontend_type">Frontend Type</label>
                                    @php $types = ['select' => 'Select Box', 'radio' => 'Radio Button', 'text' => 'Text Field', 'text_area' => 'Text Area']; @endphp
                                    <select name="frontend_type" id="frontend_type" class="form-control">
                                        @foreach($types as $key => $label)
                                            @if ($attribute->frontend_type == $key)
                                                <option value="{{ $key }}" selected>{{ $label }}</option>
                                            @else
                                                <option value="{{ $key }}">{{ $label }}</option>
                                            @endif
                                        @endforeach
                                    </select>
                                </div>
                                <div class="form-group">
                                    <div class="form-check">
                                        <label class="form-check-label">
                                            <input class="form-check-input"
                                                   type="checkbox"
                                                   id="is_filterable"
                                                   name="is_filterable"
                                                {{ $attribute->is_filterable == 1 ? 'checked' : '' }}/>Filterable
                                        </label>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="form-check">
                                        <label class="form-check-label">
                                            <input class="form-check-input"
                                                   type="checkbox"
                                                   id="is_required"
                                                   name="is_required"
                                                {{ $attribute->is_required == 1 ? 'checked' : '' }}/>Required
                                        </label>
                                    </div>
                                </div>
                            </div>
                            <div class="tile-footer">
                                <div class="row d-print-none mt-2">
                                    <div class="col-12 text-right">
                                        <button class="btn btn-success" type="submit"><i class="fa fa-fw fa-lg fa-check-circle"></i>Update Attribute</button>
                                        <a class="btn btn-danger" href="{{ route('admin.attributes.index') }}"><i class="fa fa-fw fa-lg fa-arrow-left"></i>Go Back</a>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
                <div class="tab-pane" id="values">
                    <attribute-values :attributeid="{{ $attribute->id }}"></attribute-values>
                </div>
            </div>
        </div>
    </div>
<script src="{{ asset('backend/js/app.js') }}"></script>
@endsection
Activity icon

Started a new Conversation Can't Reach The Components File To Print Changes On Screen

Hello i have this code

<div class="tab-pane" id="values">
                    <attribute-values :attributeid="{{ $attribute->id }}"></attribute-values>
   </div>

and this is my app.js file code

Vue.component('attribute-values', require('./components/AttributeValues.vue').default);

and this is my attributeValues.js file

<template>
<h3>hello</h3>
</template>

<script>
  export default {
        name: "attribute-values",
        props: ['attributeid'],
    }
    console.log('hello');
</script>

every change I made to this file doesn't take any effect on the screen I even print hello to the console log as you see above but not showing to, why is that what am I doing wrong here and new to Vue js can you please help me understand this and I will be more than grateful and thanks

Apr
11
1 month ago
Activity icon

Started a new Conversation How To Expand Laravel Bagisto To Have Multi Vendors Capabilities

Hello I want to build a store that enables users to sell there own products and has there own dashboard to do so and I found bagisto but it only enables the admin to sell product and I want another user with a level of vendor to be able to sell stuff to and another regular user that buys the products I found a paid ext that can do so but I want to do it myself and I don't have the money to pay for it heh, so is there any good tutorials to do so or even logic to do so that can make my life easier and thanks so much.

note if there is any other laravel extension that can do the multi vendors will be great to know about!

Mar
25
2 months ago
Activity icon

Awarded Best Reply on Page Return 419 Page Expired

for some reason when I update the PHP version from PHP v7.1 to PHP v7.3 it fixed my problem

Mar
24
2 months ago
Activity icon

Replied to Page Return 419 Page Expired

for some reason when I update the PHP version from PHP v7.1 to PHP v7.3 it fixed my problem

Activity icon

Started a new Conversation Change The Input Type Date From MM/DD/YYYY To YYYY/MM/DD

Hello i have an input type date and it shows to the user like this MM/DD/YYYY and i want it to be like this YYYY/MM/DD

Mar
21
2 months ago
Activity icon

Replied to Page Return 419 Page Expired

my cache drive is the same I just uploaded the same files from the server and test them at my localhost and the login process completed successfully on the localhost but it returns 419 when trying to do the same at the server.

Activity icon

Replied to Page Return 419 Page Expired

sorry my bad I was trying many things at once and copied the last edit and paste it here the csrf was not on the last try sorry again

Activity icon

Replied to Page Return 419 Page Expired

the code is working on my localhost fine but on the server it shows the error 419

Activity icon

Replied to Page Return 419 Page Expired

I did that but still the problem exists

Activity icon

Replied to Page Return 419 Page Expired

this is my login controller

<?php

namespace Bitfumes\Multiauth\Http\Controllers;

use Illuminate\Foundation\Auth\AuthenticatesUsers;
use Illuminate\Http\Request;
use Illuminate\Routing\Controller;
use Illuminate\Support\Facades\Auth;

class LoginController extends Controller
{
    /*
    |--------------------------------------------------------------------------
    | Login Controller
    |--------------------------------------------------------------------------
    |
    | This controller handles authenticating users for the application and
    | redirecting them to your home screen. The controller uses a trait
    | to conveniently provide its functionality to your applications.
    |
     */

    use AuthenticatesUsers;

    /**
     * Create a new controller instance.
     *
     * @return void
     */
    public function __construct()
    {
        $this->middleware('admin:admin', ['only' => 'showLoginForm']);
        $this->middleware('guest:admin', ['except' => 'logout']);
    }

    protected function sendLoginResponse(Request $request)
    {
        $request->session()->regenerate();

        $this->clearLoginAttempts($request);

        return redirect($this->redirectPath());
    }

    /**
     * Show the application's login form.
     *
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
     */
    public function showLoginForm()
    {
        return view('multiauth::admin.login');
    }

    /**
     * Get the needed authorization credentials from the request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    protected function credentials(Request $request)
    {
        $request['active'] = 1;
        return $request->only($this->username(), 'password', 'active');
    }

    /**
     * @param Request $request
     *
     * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
     */
    public function logout(Request $request)
    {
        $this->guard()->logout();

        $request->session()->invalidate();

        return redirect(route('admin.login'));
    }

    /**
     * Get the guard to be used during authentication.
     *
     * @return \Illuminate\Contracts\Auth\StatefulGuard
     */
    protected function guard()
    {
        return Auth::guard('admin');
    }

    /**
     * Validate the user login request.
     *
     * @param \Illuminate\Http\Request $request
     *
     * @return void
     */
    protected function validateLogin(Request $request)
    {
        $request->validate([
            'email'    => 'required|string',
            'password' => 'required|string',
        ]);
    }

    protected function redirectPath()
    {
        return config('multiauth.redirect_after_login');
    }
}

and this is the login view

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!-- Meta, title, CSS, favicons, etc. -->
    <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="csrf-token" content="{{ csrf_token() }}">
    <title>Makondi</title>

    <!-- Bootstrap -->
    <link href="{{ asset('backend/vendors/bootstrap/dist/css/bootstrap.min.css')}}" rel="stylesheet">
    <!-- Font Awesome -->
    <link href="{{ asset('backendvendors/font-awesome/css/font-awesome.min.css')}}" rel="stylesheet">
    <!-- NProgress -->
    <link href="{{ asset('backend/vendors/nprogress/nprogress.css')}}" rel="stylesheet">
    <!-- Animate.css -->
    <link href="{{ asset('backend/vendors/animate.css/animate.min.css')}}" rel="stylesheet">

    <!-- Custom Theme Style -->
    <link href="{{ asset('backend/build/css/custom.min.css')}}" rel="stylesheet">
  </head>

  <body class="login" style="background-color: black">
    <div>
      <a class="hiddenanchor" id="signup"></a>
      <a class="hiddenanchor" id="signin"></a>

      <div class="login_wrapper">
        <div class="animate form login_form">
          <section class="login_content">
            <form  method="POST" action="{{ route('admin.login') }}">
              <h1 style="color:white"> Login Form</h1>
              <div >
                    <input id="email" type="email" class="form-control{{ $errors->has('email') ? ' is-invalid' : '' }}" name="email" value="{{ old('email') }}"
                    required autofocus  placeholder="Username"> @if ($errors->has('email'))
                        <span class="invalid-feedback" role="alert">
                            <strong>{{ $errors->first('email') }}</strong>
                        </span> @endif
               </div>
              {{-- <div>
                <input type="text" class="form-control" placeholder="Username" required="" />
              </div> --}}

              <div >
                    <input id="password" type="password" class="form-control{{ $errors->has('password') ? ' is-invalid' : '' }}" name="password"
                    required placeholder="Password"> @if ($errors->has('password'))
                        <span class="invalid-feedback" role="alert">
                            <strong>{{ $errors->first('password') }}</strong>
                        </span> @endif
                </div>
              {{-- <div>
                <input type="password" class="form-control" placeholder="Password" required="" />
              </div> --}}
              <div>
                 <button type="submit" class="btn " style="background-color:orangered">
                                    {{ __('Login') }}
                 </button>
                <a class="btn btn-link" href="{{ route('admin.password.request') }}" style="color:white">
                                    {{ __('Forgot Your Password?') }}
                </a>
              </div>

              <div class="clearfix"></div>

              <div class="separator">
               

                <div class="clearfix"></div>
                <br />

                <div>
                  <h1 style="color:white"><img src="{{ URL('backend/docs/images/IMG-20190507-WA0001~2.jpg') }}" width="70px" height="60px"> Company Makondi</h1>
                  <p style="color:white">©2019 All Rights Reserved. Company Makondi. Privacy and Terms</p>
                </div>
              </div>
            </form>
          </section>
        </div>

      </div>
    </div>
  </body>
</html>
Activity icon

Started a new Conversation Page Return 419 Page Expired

Hello, I have a login form that returns a 419-page expired error first I thought that I might forget using the @csrf but it exists and I also tried the csrf_filed() but still not working the same error message am using Laravel multi auth do you have any idea why this error appears? and thanks for the help I really do appreciate it.

Feb
18
3 months ago
Activity icon

Started a new Conversation Resize Images Multiable Images Using Laravel Intervation

Hello, i have too many images and every 5 to 10 images are on seprate folder and i made a change on my website design and the current image width and height are good for the new design does there anyway that i can resize all of them at once and keep each of them at there folders cuz i have more than 600 images and well be very painfull to do it manuly update each article image i have like 400 article and thanks.

Feb
07
3 months ago
Activity icon

Started a new Conversation Cleaing Up Some Php Code

hello I have this messy code and it gets messier every time I add to it and I want to make it cleaner but couldn't do it myself can you please help me with this and thanks

// those are the var used to replace words from an article to bold the specific word if found at the string
@php    
$Tags = @explode(',',$game_info->g_tags);
$g_tag = current($Tags);
$Tags = @explode(',',$game_info->g_tags);
$s_gamename = "<span class='text-light'>$game_info->g_name</span>";
$b_3d = "<b class='text-light'>3D</b>";
$b_2d = "<b class='text-light'>2D</b>";
$b_crossplatform = "<b class='text-light'>Cross Platform</b>";
$b_multiplayer = "<b class='text-light'>Multiplayer</b>";
$b_guide  = "<b class='text-light'>Story </b>";
$b_story  = "<b class='text-light'>Guide </b>";
$b_pvp  = "<b class='text-light'>PVP </b>";
$b_pve  = "<b class='text-light'>PVE </b>";
$b_game  = "<b class='text-light'> Game </b>";
$b_classes  = "<b class='text-light'>Classes</b>";
$b_players  = "<b class='text-light'>Players</b>";
$b_mmo  = "<a class='text-warning' href='/mmo-games'> MMO </a>";
$b_r2games = "<b class='text-light'>R2Games</b>";
$b_gtarcade = "<b class='text-light'>GTArcade</b>";
$b_upjers = "<b class='text-light'>Upjers</b>";
$b_101xp = "<b class='text-light'>101XP</b>";
$b_gameforge = "<b class='text-light'>GameForge</b>";
@endphp

and this is the article code

<p>
            {!! str_ireplace(array("\r","\n\n","\n", $game_info->g_name, '3D','2D', 'cross platform', 'cross-platform', 'multiplayer', 'r2games', 'upjers', '101xp', 'gameforge', 'story', 'guide', 'classes', 'pvp', 'pve', ' game ', 'players', ' mmo ', 'gtarcade'),array('',"\n","</p>\n<p>", $s_gamename, $b_3d, $b_2d,  $b_crossplatform,$b_crossplatform, $b_multiplayer, $b_r2games, $b_upjers, $b_101xp, $b_gameforge, $b_story, $b_guide, $b_classes,  $b_pvp, $b_pve, $b_game, $b_players, $b_mmo, $b_gtarcade),trim($game_info->g_info,"\n\r")) !!}</p>
Dec
12
5 months ago
Activity icon

Started a new Conversation How To Send Mail Using Zoho Laravel Mailable

Hello, I want to send mail using Zoho instead of mailgun and mailtrap is it possible now this are my .env setting looks like but it's not working as it should return an error

MAIL_DRIVER=smtp
MAIL_HOST=smtp.zoho.com
MAIL_PORT=465
MAIL_ENCRYPTION=SSL

and this is the error am getting

Swift_TransportException
Expected response code 250 but got code "530", with message "530 5.5.1 Authentication Required. "
Dec
08
5 months ago
Activity icon

Replied to Help With A Bug On Jquery Code Hide Parts On Navbar When The User Scroll Down

not working now I can scroll 2 times but the third one automatically return me to 0 I have to keep holding the down arrow to escape this error

Activity icon

Started a new Conversation Help With A Bug On Jquery Code Hide Parts On Navbar When The User Scroll Down

Hello I have this kind of big sticky navbar and I want to hide some parts of it when the user starts scrolling and show them again the user scroll to the very top of the page this is the jquery code

var lastScrollTop = 51;
$(window).scroll(function() {
    var scrollTop = $(this).scrollTop();
    if ($(this).scrollTop() != 51) {
        $('#main_header_con').hide();
        $(".main_page_nav").addClass('nav_cat_sticky');
    } else {
        $('#main_header_con').show();
    }
    lastScrollTop = scrollTop;
});

when i console_log the scroll to the scrollTop var it keeps going from 50 to 0 I need to tap on my keyboard down array keep holding for the scrolling to work. and this is the navbar

        <nav class="container-fluid main_page_nav">
          <div class="main_nav container position-relative">
            <!-- The navigation menu -->
            <div class="navbar row  justify-content-center">
              <div id="main_header_con" class="row main_header_con">
                <div class="subnav col-9">
                    <div class="subnavbtn">
                      <a href="/" title="Home Page">
                        <img src="{{ asset('images/new-logo.png') }}" alt="OvOnGames Home Page" class="logo-image">
                        {{-- <strong>
                        <span class="Ov">Ov</span><span class="On">On</span><span class="Games">Games</span>
                      </strong> --}}
                    </a> <p class="text-light top_nav_info mt-4">@yield('page-header-info') </p>
                    </div>
                </div>
                <div class="subnav col-3 self-center text-light mt-4">
                  <ul class="list-inline float-right">
                    <li class="list-inline-item mt-3">
                     <a href="https://pinterest.com/ovongames/" class="text-light" target="_blank">
                           <img data-src="{{asset('images/pinterest.png')}}" alt="Youtube Icon" class="fullscreen-icon lazy"  title="OvOnGames Pinterest Page">
                      </a>
                  </li>
                  <li class="list-inline-item mt-3">
                      <a href="https://www.youtube.com/channel/UCArtk7Jc28eXRBg_6Gngvdg" class="text-light" target="_blank">
                      <img data-src="{{asset('images/youtube-icon.png')}}" alt="Youtube Icon" class="fullscreen-icon lazy"  title="OvOnGames Youtube Channel">
                    </a>
                  </li>
                  <li class="list-inline-item mt-3">
                     <a href="https://web.facebook.com/OvonGames/" class="text-light" target="_blank">
                        <img data-src="{{asset('images/facebook-icon.png')}}" alt="OvOnGames Facebook  Page" class="fullscreen-icon lazy" title="OvOnGames FaceBook Page">
                    </a>
                  </li>
                  </ul>         
                  <ul class="list-inline w-100">
                    @if(!isset(Auth::user()->id))
                    <li class="list-inline-item float-right">
                      <a href="/register"  class="text-light h-text-warning">Register</a>
                    </li>
                    <li class="list-inline-item float-right"> |
                      <a href="/login"  class="text-light h-text-warning">Login</a>
                    </li>
                    @else
                    <li class="list-inline-item float-right table-bordered">
                      <a href="/users" class="text-light float-right" title="{{ Auth::user()->name }} Profile Page">
                        <img src="{{ asset('storage/users-profile-images/avatar_sm.jpg') }}" alt="{{ Auth::user()->name }} Profile Image" title="{{ Auth::user()->name }} Profile Page">{{ Auth::user()->name }}
                      </a>
                    </li>
                    @endif
                  </ul>         
                </div>
              </div>
                <div class="row navbar_category_con">
                  <div class="subnav main_header_con">
                    <div class="subnavbtn" id="nav">
                      <a href="/browser-games" class="text-light font-weight-bold text-dec-none h-text-warning h5">
                          <b>BROWSER GAMES</b>
                      </a>
                    </div>
                </div>
                <div class="subnav">
                    <div class="subnavbtn">
                      <a href="/online-games" class="text-light h5 text-dec-none h-text-warning"><b>ONLINE GAMES</b>
                    </a>
                  </div>
                </div>
                <div class="subnav main_header_con">
                    <div class="subnavbtn">
                        <a href="/mmo-games" class="text-light text-dec-none h-text-warning h5">
                            <b>MMO GAMES</b>
                        </a>
                    </div>
                </div>
                <div class="subnav">
                    <div class="subnavbtn">
                      <a href="/html5-games" class="text-light text-dec-none h-text-warning h5">
                        <b>HTML5 GAMES</b>
                      </a>
                    </div>
                </div>
                <div class="subnav main_header_con">
                    <div class="subnavbtn">
                      <a href="/news" class="text-light text-dec-none h-text-warning h5">
                        <b>News</b>
                      </a>
                    </div>
                    </div>
                </div>
            </div>
            </div>
        </nav>
Dec
06
5 months ago
Activity icon

Replied to Coverting From Jquery To Javascript

now am getting this error

VM92:1 Uncaught SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at XMLHttpRequest.request.onload (browser-games?page=2:1152)

and this is the source

// Success!
    var data = JSON.parse(this.response);
Activity icon

Replied to Coverting From Jquery To Javascript

working with event handler is easy the only thing i field doing is javascript with ajax this part

function fetch_data(page){
            $.ajax({
                url: '/pagination/fetch_browsergames_data?page='+page,
                success: function(data){
                    $("#games_content").html(data);
                    $('html, body').animate({scrollTop : 0},1000);
                    var lazyLoadInstance = new LazyLoad({
                        elements_selector: ".lazy"
                        // ... more custom settings?
                    });
                    $(".page-loader").addClass('page-loader-hidden');
                }
            })
        }

and no am not looking for someone to do all for me, and i was already trying to do it myself before posting this Q and after searching on google and so on to know how to handle how to work with event lessenor and also work with js and ajax the event lessener part was easy but the ajax part was really confussing and i could'nt get it.

Activity icon

Started a new Conversation Coverting From Jquery To Javascript

Hello I have this code in jquery and I want to cover it to pure javascript cuz does not make any sense for me to use 80k liberty to just make a small task can anyone help please am very bad when it comes to js but kind of good at jquery. Jquery

<script async>
        $(document).on('click', '.pagination a', function(event){
            event.preventDefault();
            $(".page-loader").removeClass('page-loader-hidden');
            var page = $(this).attr('href').split('page=')[1];
            fetch_data(page);
        });
        function fetch_data(page){
            $.ajax({
                url: '/pagination/fetch_browsergames_data?page='+page,
                success: function(data){
                    $("#games_content").html(data);
                    $('html, body').animate({scrollTop : 0},1000);
                    var lazyLoadInstance = new LazyLoad({
                        elements_selector: ".lazy"
                        // ... more custom settings?
                    });
                    $(".page-loader").addClass('page-loader-hidden');
                }
            })
        }
        //search box
  $(document).ready(function(e){
  $("#searchBox").keyup(function() {
  $("#show_upSearch").removeClass('d-none');
  var text = $(this).val();
  var textlen = $(this).val(),length;
  $.ajax({
  method:"GET",
  url:"/search-box/browser-game",
  data:{text:text},
  success:function(data){
  if (textlen != 0) {
  $("#show_upSearch").html(data);
  }else{
  $("#show_upSearch").html("");
  }
  }
  })
  });
  });
</script>