satiseven777

CEO rasadata at rasadata

Hire Me

Experience

15,090

1 Best Reply Awards

  • Member Since 1 Year Ago
  • 139 Lessons Completed
  • 1 Favorite

6th March, 2018

satiseven777 left a reply on Laravel 5.3 Session Be Destory After Refresh Page On Host • 5 months ago


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

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

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

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!

9th February, 2018

satiseven777 left a reply on How Can I Should Read This Data • 6 months ago

tnx for your help Guys!

satiseven777 left a reply on How Can I Should Read This Data • 6 months ago

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

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

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

satiseven777 left a reply on How Can I Should Read This Data • 6 months ago

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

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

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!

2nd February, 2018

satiseven777 left a reply on Comments And Laravel • 6 months ago

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? • 6 months ago

Tabriz, South Azerbaycan

satiseven777 started a new conversation Comments And Laravel • 6 months ago

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!

30th January, 2018

satiseven777 left a reply on Connect To Multiple Database Type • 6 months ago

you should config in database.php!

27th January, 2018

satiseven777 left a reply on Laravel Get Location • 6 months ago

satiseven777 left a reply on Send Password Reset Link In Users Gmail • 6 months ago

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!

26th January, 2018

satiseven777 left a reply on Many To Many Relationship Better Solution • 6 months ago

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

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

satiseven777 left a reply on Many To Many Relationship Better Solution • 6 months ago

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

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

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

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

25th January, 2018

satiseven777 left a reply on Laravel ECommerce • 6 months ago

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) • 6 months ago

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) • 6 months ago

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) • 6 months ago

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?

24th January, 2018

satiseven777 left a reply on WISIWYG Editor • 6 months ago

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

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). • 6 months ago

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) • 6 months ago

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

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

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

use this function instead of it!

            $ext      = pathinfo($_FILES['thumb_img']['name'], PATHINFO_EXTENSION);

23rd January, 2018

satiseven777 left a reply on Why Session Expire In Next Request ? • 6 months ago

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

$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 • 6 months ago

$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 • 6 months ago

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

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',

]);

29th December, 2017

Edit Your Profile
Update

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