satiseven777

satiseven777

CEO rasadata at rasadata

Tabriz

Hire Me

Member Since 2 Years Ago

Experience Points 15,200
Experience
Level
Lessons Completed 139
Lessons
Completed
Best Reply Awards 1
Best Answer
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.

09 Nov
4 days ago

satiseven777 left a reply on What Is .then For?

if your called function returns any data with any errors THEN will call else you should catch errors bu .catch

01 Nov
1 week ago

satiseven777 started a new conversation Laravel + AngularJs

Hey! I want to Pass MY Database Record To Angularjs init But I can't ng-repeat it in Angular ! I dont want to make Json Manually By Laravel foreach !

27 Sep
1 month ago

satiseven777 started a new conversation Merge Images

Hey,I want to merge multi images in single images! Is there any laravel Packages for this? Images formats is png and transparent! you can see final images from this link https://www.gokcekmarket.com/siteimages/1534502334.png I wanna to make images like this!

06 Mar
8 months ago

satiseven777 left a reply on Laravel 5.3 Session Be Destory After Refresh Page On Host


 if(session()->has('hassession')){
     echo "has session";
 }
 else{
     echo "has not";
     session(['hassession'=>'rrr']);
 }

satiseven777 left a reply on Laravel 5.3 Session Be Destory After Refresh Page On Host

if(session()->has('hassession')){ echo "has session"; } else{ echo "has not"; session(['hassession'=>'rrr']); }

satiseven777 left a reply on Laravel 5.3 Session Be Destory After Refresh Page On Host

no,user cant login because session is like Flash session! session be create but destroy immediately!

satiseven777 started a new conversation Laravel 5.3 Session Be Destory After Refresh Page On Host

my sessions works perfect on localhost but when I want to run on host it doesnt work and when user refresh the page,stored data in session is completely clean! I have searched on net but given answer did not helped me!

09 Feb
9 months ago

satiseven777 left a reply on How Can I Should Read This Data

tnx for your help Guys!

satiseven777 left a reply on How Can I Should Read This Data

for each is in the blade view and I need full info of products that ordered and now I got those but I have problems in showing theme!

satiseven777 left a reply on How Can I Should Read This Data

No,Unfortunately! I get this error

Trying to get property of non-object

satiseven777 left a reply on How Can I Should Read This Data

It doesn't make diffrent,It,s the same function~

satiseven777 left a reply on How Can I Should Read This Data

my controller codes is now too short !

$orders = orders::orderBy('id', 'desc')->with(['user.profile','OrdersProducts.products.images'])->get()->all();
 
        return view('admin.satislist')->with(compact('orders'));

satiseven777 left a reply on How Can I Should Read This Data

and when I want to get this in foreach I got this error

mycode
@foreach($row->orders_products as $product)

and error

Invalid argument supplied for foreach() 

satiseven777 started a new conversation How Can I Should Read This Data

Please see the picture I want to read Order_products data,I,m getting all of other data in the array but order_product data is trouble for me!

02 Feb
9 months ago

satiseven777 left a reply on Comments And Laravel

TNX for reply!I want to show Cm on products page!

$categories = cate::get()->take(25);
       if (count(pro::where('slug', $slug)->get()->first()) < 1) {
           abort(404);
       }

       $product = pro::whereSlug($slug)->with('images', 'comments', 'categories', 'tags')->get()->first();
       if (count($product->categories) > 0) {
           $related_pro = cate::where('id', $product->categories[0]['id'])->with('products')->take(5);
       }

       if (empty($product)) {
           abort(404);
       }
     
       $collection = collect($product->comments)->groupBy('parent');
 return $collection;

And I get this! https://drive.google.com/file/d/1Udbv-srp4bPoaIBNDWH512XZnH-TvScR/view?usp=sharing

satiseven777 left a reply on Where Are You All From?

Tabriz, South Azerbaycan

satiseven777 started a new conversation Comments And Laravel

hey,I want to show comment in view by parent child sorting!I made a collection and grouped it by parent id but still my problem is going on and I cant show in view!if you know better method for parent child sorting I will use it!

30 Jan
9 months ago

satiseven777 left a reply on Connect To Multiple Database Type

you should config in database.php!

27 Jan
9 months ago

satiseven777 left a reply on Send Password Reset Link In Users Gmail

you should set .env file and give your mail server information on it! if you use Host Control panel like cpanel or directadmin you can get information on webmail or mail configration part! info is like this!

Username:   [email protected]
Password:   Use your cPanel password.
Incoming Server:    mail.aloeerra.com.tr

    IMAP Port: 993 POP3 Port: 995 

Outgoing Server:    mail.aloeerra.com.tr

    SMTP Port: 465 

if you want to use external mail server you can find on internet!

26 Jan
9 months ago

satiseven777 left a reply on Many To Many Relationship Better Solution

Kardeşim bence senin Tabloların yanlışdı ama benim daha önceden gönderdim kodlara bak lütfen senin sıkıntını hel eder!

satiseven777 left a reply on Many To Many Relationship Better Solution

Kardeşim yardıma ihtiyacın olsa soyle! ;)

satiseven777 left a reply on Many To Many Relationship Better Solution

It makes no different!you can access all of your database data in this method! if I understood you want to access sub model of main model! in my model 'image' is a name of a table and this is not name of table field!

satiseven777 left a reply on Many To Many Relationship Better Solution

and with this code

        $pro        = category::where('id', $id)->with(['products.images'])->get()->first();

satiseven777 left a reply on Many To Many Relationship Better Solution

this is sample for product! I can get product in category and image in product! CATEGORY MODEL

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Category extends Model
{
    public $timestamps = false;
    public function products()
    {
        return $this->belongsToMany('App\Products', 'categories_products');
    }
    public function CateSort()
    {
        return $this->belongsTo('App\CateSort', 'categories_id', 'cate_sorts');
    }
      public function images()
    {
        return $this->hasOne('App\Images','id','thumb_id');   
    }
}

PRODUCT MODEL

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Products extends Model
{
    protected $table    = 'products';
    protected $fillable = ['title', 'slug', 'desc', 'content', 'status', 'user_id', 'sku', 'stock', 'price', 'weight', 'featured', 'campain', 'thumb_id', 'onay'];

    public function tags()
    {
        return $this->belongsToMany('App\Tag', 'products_tags');
    }
    public function categories()
    {
        return $this->belongsToMany('App\Category', 'categories_products');
    }

    public function varyasyon()
    {
        return $this->hasMany('App\Varyasyon', 'product_id');
    }
    public function images()
    {
        return $this->hasOne('App\Images', 'id', 'thumb_id');
    }

    public function proSort()
    {
        return $this->belongsTo('App\proSort', 'products_id', 'pro_sorts');
    }
    public function comments()
    {
        return $this->hasMany('App\comments', 'product_id');
    }
}


and Image Model

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Images extends Model
{
    protected $table='images';
 protected $fillable = [
        'id','user_id', 'parent_id','thumb_id' ,'describe', 'img_path', 'created_at',
    ];

     public function user()
    {
        return $this->belongsTo('App\User');
    }
    public function products()
    {
        return $this->belongsTo('App\Products','thumb_id');
    }
  public function varyasyon()
    {
        return $this->belongsTo('App\Varyasyon','thumb_id');
    }
      public function category()
    {
        return $this->belongsTo('App\Category','thumb_id');
    }
  
}


satiseven777 left a reply on Can't Take Data For Current User

first you should change your user function name on eloquent because Laravel has a function on Auth named Auth::user() and it will be a problem!you can change it to users! If your users and habits tables has standard relations you can get singed user by this

\App\User::whereId(Auth::id())->with('habits')->first();

you can get it many other methods

25 Jan
9 months ago

satiseven777 left a reply on Laravel ECommerce

you can use this Admin panel but every website has spacial requirement!

https://backpackforlaravel.com/

satiseven777 left a reply on Slow Query Relusts(Tag Search)

Its my category and products model for sample!

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Category extends Model
{
    public $timestamps = false;
    public function products()
    {
        return $this->belongsToMany('App\Products', 'categories_products');
    }
    public function CateSort()
    {
        return $this->belongsTo('App\CateSort', 'categories_id', 'cate_sorts');
    }
      public function images()
    {
        return $this->hasOne('App\Images','id','thumb_id');   
    }
}

and this

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Products extends Model
{
    protected $table='products';
    protected $fillable = ['title', 'slug', 'desc', 'content', 'status', 'user_id','sku','stock','price','weight','featured','campain','thumb_id','onay'];

 public function tags() {
        return $this->belongsToMany('App\Tag','products_tags');
    }
       public function categories()
    {
        return $this->belongsToMany('App\Category','categories_products');
    }
    
        public function varyasyon()
    {
        return $this->hasMany('App\Varyasyon','product_id');   
    }
     public function images()
    {
        return $this->hasOne('App\Images','id','thumb_id');   
    }

       public function proSort()
    {
        return $this->belongsTo('App\proSort','products_id','pro_sorts');
    }
}

satiseven777 left a reply on Slow Query Relusts(Tag Search)

you should use mTom relations and define a middle table for holding keys of articles and tags! I think your method is wrong ! If your users will get Article by typing its tag,you can do it very simple by relations!

satiseven777 left a reply on Slow Query Relusts(Tag Search)

what is the target of doing this

      $articles = Article::whereHas('tags', function($query) use ($text) {
            $query->where('name', $text);
        })->paginate(10);

do you want to get all tags that has filtered by $text?

24 Jan
9 months ago

satiseven777 left a reply on WISIWYG Editor

http://tinymce.com/ is very good and you can find free version on its site! and summernote has a light version! I have used both of theme and I love tiny

satiseven777 left a reply on TokenMismatchException In VerifyCsrfToken.php Line 67 Only On Some Domains

regenerate key on every domain that you want to use!

php artisan key:generate

satiseven777 left a reply on Many To Many Relationship(Cant Understand).

are you get any error in insert or delete?what is mode of your relations in on update event?is cascade or else? give me ur given error!

satiseven777 left a reply on Using Model Events To Delete A Long Thread (with Replies And Likes)

I did not Understand fully,but you can use cascade on your relation and db will full delete your records!

satiseven777 left a reply on How To Store Multiple Images Filename In One Column Using Laravel

you should create a other table that can be named images and make a foreign key between product table and images table,you are using very old method for storing your images link :~) you should use one to many relation between your product and images table! you can find very helpful docs in laravel own site! if you had and problems I can send you sample code!

satiseven777 left a reply on Database Connection Issue: Using Root User But Error Getting "Access Denied For User 'homestead'@'localhost' (using Password: YES)"

you should delete env function on start of your database config file

'mysql' => [
            'driver' => 'mysql',
            'host' => env('DB_HOST', '127.0.0.1'),
            'port' => env('DB_PORT', '3306'),
            'database' => env('DB_DATABASE', 'forge'),
            'username' => 'yourUserName',
            'password' => 'yourPassword',
            'unix_socket' => env('DB_SOCKET', ''),
            'charset' => 'utf8mb4',
            'collation' => 'utf8mb4_unicode_ci',
            'prefix' => '',
            'strict' => true,
            'engine' => null,
        ]

satiseven777 left a reply on Invalid Argument Supplied For Foreach() While Uploading Images

use this function instead of it!

            $ext      = pathinfo($_FILES['thumb_img']['name'], PATHINFO_EXTENSION);
23 Jan
9 months ago

satiseven777 left a reply on Why Session Expire In Next Request ?

I dont think ur session has expire!dump ur all session and test it,ur using helpers if you use session()->put('lang', ''); I think is better!

satiseven777 left a reply on Invalid Argument Supplied For Foreach() While Uploading Images

$inputs       = $request->rows;
            $collection   = array();
            $var_thumb_id = array();
            foreach ($inputs as $input) {
                if (!empty($input['img'])) {
                    $image = $input['img'];
                    $image_thumb_id     = 0;
            $user_are_inserting = Auth::id();
            $uploaded           = Image::make($image)->fit(1000, 1000);
            $arkapilan          = Image::make(asset('public/gokcekmarket.jpg'))->fit(1000, 1000);
            $image              = Image::canvas(1000, 1000);
            $image->insert($arkapilan);
            $image->insert($uploaded);
            $ext      = pathinfo($_FILES['thumb_img']['name'], PATHINFO_EXTENSION);
            $filename = time() . '.' . $ext;
            $path     = public_path('images/' . $filename);
            $path74   = public_path('images/74/' . $filename);
            $path170  = public_path('images/170/' . $filename);
            $path403  = public_path('images/403/' . $filename);
            if ($image->save($path)) {
                Image::make($path)->fit(403, 403)->save($path403);
                Image::make($path)->fit(170, 170)->save($path170);
                Image::make($path)->fit(74, 74)->save($path74);
                $insert            = new Images;
                $insert->id        = null;
                $insert->user_id   = $user_are_inserting;
                $insert->parent_id = 0;
                $insert->describe  = $request->title;
                $insert->img_path  = $filename;
                $insert->save();
                $image_thumb_id = $insert->id;

            } //if insert image

satiseven777 left a reply on Invalid Argument Supplied For Foreach() While Uploading Images

$inputs = $request->rows; $collection = array(); $var_thumb_id = array(); foreach ($inputs as $input) { if (!empty($input['img'])) { $image = $input['img']; $image_thumb_id = 0; $user_are_inserting = Auth::id(); $uploaded = Image::make($image)->fit(1000, 1000); $arkapilan = Image::make(asset('public/gokcekmarket.jpg'))->fit(1000, 1000); $image = Image::canvas(1000, 1000); $image->insert($arkapilan); $image->insert($uploaded); $ext = pathinfo($_FILES['thumb_img']['name'], PATHINFO_EXTENSION); $filename = time() . '.' . $ext; $path = public_path('images/' . $filename); $path74 = public_path('images/74/' . $filename); $path170 = public_path('images/170/' . $filename); $path403 = public_path('images/403/' . $filename); if ($image->save($path)) { Image::make($path)->fit(403, 403)->save($path403); Image::make($path)->fit(170, 170)->save($path170); Image::make($path)->fit(74, 74)->save($path74); $insert = new Images; $insert->id = null; $insert->user_id = $user_are_inserting; $insert->parent_id = 0; $insert->describe = $request->title; $insert->img_path = $filename; $insert->save(); $image_thumb_id = $insert->id;

        } //if insert image

satiseven777 left a reply on Invalid Argument Supplied For Foreach() While Uploading Images

My Code sample

$inputs = $request->rows; $collection = array(); $var_thumb_id = array(); foreach ($inputs as $input) { if (!empty($input['img'])) { $image = $input['img']; $image_thumb_id = 0; $user_are_inserting = Auth::id(); $uploaded = Image::make($image)->fit(1000, 1000); $arkapilan = Image::make(asset('public/gokcekmarket.jpg'))->fit(1000, 1000); $image = Image::canvas(1000, 1000); $image->insert($arkapilan); $image->insert($uploaded); $ext = pathinfo($_FILES['thumb_img']['name'], PATHINFO_EXTENSION); $filename = time() . '.' . $ext; $path = public_path('images/' . $filename); $path74 = public_path('images/74/' . $filename); $path170 = public_path('images/170/' . $filename); $path403 = public_path('images/403/' . $filename); if ($image->save($path)) { Image::make($path)->fit(403, 403)->save($path403); Image::make($path)->fit(170, 170)->save($path170); Image::make($path)->fit(74, 74)->save($path74); $insert = new Images; $insert->id = null; $insert->user_id = $user_are_inserting; $insert->parent_id = 0; $insert->describe = $request->title; $insert->img_path = $filename; $insert->save(); $image_thumb_id = $insert->id;

        } //if insert image

satiseven777 started a new conversation How Can I Controll Multi View

I want to redirect pages to a spacial view with array of view in route and route should control and redirect to target view!I dont want to use If statement,I used a method before but I cant remember right syntax of that! a work like this that is wrote for resource controller

Route::resources([ 'kategory' => 'CategoryController', 'sayfa' => 'PageController', . . . .

'sortcategory' => 'CateSortController',

]);