alihuseyin

Experience

1,010

0 Best Reply Awards

  • Member Since 1 Month Ago
  • 0 Lessons Completed
  • 0 Favorites

20th January, 2018

alihuseyin left a reply on Apache Setup Domain Name (failed) • 1 day ago

@laurent1979 thank you very much but I have just re installed ubuntu and installed vestapanel and now it goes well.

alihuseyin left a reply on Apache Setup Domain Name (failed) • 1 day ago

@laurent1979 I can send you login information via mail or i can put any specific configuration here ...

under etc/apache2/sites-available$

i have "000-default.conf 000-default-le-ssl.conf default-ssl.conf sitename.conf sitename.xyz.conf" files and

"sitename.xyz.conf" is like

<VirtualHost *:80>
        ServerAdmin [email protected]
        ServerName sitename.xyz
        ServerAlias www.sitename.xyz
        DocumentRoot /var/www/sitename.xyz/public_html
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

alihuseyin started a new conversation Apache Setup Domain Name (failed) • 1 day ago

I am trying to set up domain name in ubuntu 16.04 and i followed everything here : https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-16-04

Yesterday I was able to reach http:/mysite.com but today i cant reach it. Can anyone help me ?

18th January, 2018

alihuseyin left a reply on 2018- Best Hosting (subjective) • 3 days ago

@Breki and @bobbybouwmann for DO which os distros do you use or suggest to a newbie ?

alihuseyin started a new conversation 2018- Best Hosting (subjective) • 4 days ago

hello, i have searched comments about hosting firms for laravel project and mostly i saw comments of 2015 or before.

I wonder what you guys use for laravel project and if anyone use shared hosting which supports ssh?

alihuseyin started a new conversation Has Anyone Used Webra Host For Laravel Project? • 4 days ago

I am looking for a host for laravel project (cheap one) and i saw this website : https://www.webrahost.com/laravel-hosting.html?gclid=CjwKCAiAqIHTBRAVEiwA6TgJw4wLQVW67qLVVvU1C5Zjooo7g2cJT_PLBUf9Iucz7owDe2zq0FfYwhoCp8YQAvD_BwE

do you think it is good to use?

11th January, 2018

alihuseyin left a reply on (laravel Project On Server) HTTP ERROR 500 • 1 week ago

@tykus yes I restarted it from vesta panel

alihuseyin left a reply on (laravel Project On Server) HTTP ERROR 500 • 1 week ago

@tykus unfortunality it didn't work... I will try to re configure php7+.

alihuseyin left a reply on (laravel Project On Server) HTTP ERROR 500 • 1 week ago

@tykus my according to this information "Loaded Configuration File : /etc/php/7.2/apache2/php.ini" it doesnt include open_basedir.

here where includes open_basedir path /home/admin/conf/web/website.com.apache2.conf

    ServerName website.com
    ServerAlias website.com
    ServerAdmin [email protected]
    DocumentRoot /home/admin/web/website.com/public_html
    ScriptAlias /cgi-bin/ /home/admin/web/website.com/cgi-bin/
    Alias /vstats/ /home/admin/web/website.com/stats/
    Alias /error/ /home/admin/web/website.com/document_errors/
    #SuexecUserGroup admin admin
    CustomLog /var/log/apache2/domains/website.com.bytes bytes
    CustomLog /var/log/apache2/domains/website.com.log combined
    ErrorLog /var/log/apache2/domains/website.com.error.log
    <Directory /home/admin/web/website.com/public_html>
        AllowOverride All
        Options +Includes -Indexes +ExecCGI
        php_admin_value open_basedir  /home/admin/web/website.com/public_html/:/home/admin/tmp/
        php_admin_value upload_tmp_dir  /home/admin/tmp
        php_admin_value session.save_path /home/admin/tmp
    </Directory>
    <Directory /home/admin/web/website.com/stats>
        AllowOverride All

10th January, 2018

alihuseyin left a reply on (laravel Project On Server) HTTP ERROR 500 • 1 week ago

@tykus yes I am able to run composer on the servor and I tried both of ways 1-> creating laravel project on the server 2-> uploading laravel project to the server

alihuseyin left a reply on (laravel Project On Server) HTTP ERROR 500 • 1 week ago

@tykus yes I have,

I had upload same project to a shared hosting and it was working fine but not It fails

alihuseyin left a reply on (laravel Project On Server) HTTP ERROR 500 • 1 week ago

@wilburpowery xcloud server

alihuseyin started a new conversation (laravel Project On Server) HTTP ERROR 500 • 1 week ago

my panel : vesta panel os : debian 8x Current PHP version: 7.0.27-1~dotdeb+8.17.0.27-1~dotdeb+8.1

I am getting HTTP ERROR 500

I set the path in index.php

require DIR.'/../MyFolder/vendor/autoload.php'; $app = require_once DIR.'/../MyFolder/bootstrap/app.php';

I tried this but doesnt work for me.

sudo chmod 755 -R MyFolder chmod -R o+w MyFolder/storage --

Anyone can help?

9th January, 2018

alihuseyin left a reply on File_put_contents(C:\xampp\htdocs\xxx\storage\framework/sessions/KXcxw0bXfbUEyvf2fCN12hiHt9VFeWTFFEzS42rk): Failed To Open Stream: No Such File Or Directory • 1 week ago

@bashy sorry I am new to laravel and it was working fine yesterday, can you give me an example?

alihuseyin left a reply on File_put_contents(C:\xampp\htdocs\xxx\storage\framework/sessions/KXcxw0bXfbUEyvf2fCN12hiHt9VFeWTFFEzS42rk): Failed To Open Stream: No Such File Or Directory • 1 week ago

@shez1983 not really, now I am trying to re upload all files and folders to shared hosting, let's see If it will be fixed

alihuseyin started a new conversation File_put_contents(C:\xampp\htdocs\xxx\storage\framework/sessions/KXcxw0bXfbUEyvf2fCN12hiHt9VFeWTFFEzS42rk): Failed To Open Stream: No Such File Or Directory • 1 week ago

I upload my laravel to shared hosting but it's path for storage is C:\xampp... (local)

How can I change it? or do I have a choise to not using session option?

6th January, 2018

alihuseyin started a new conversation Social Login And Custom Login • 2 weeks ago

Hello, what if someone has registered via custom registration and later he has tried to register via social registration and in both registrations he used same email ?

In laravel with custom autheration, if he sings up with social login, it sings up with custom registration.

In this case, what way or ways do you guys use or suggest?

30th December, 2017

alihuseyin left a reply on Shared Hosting Run Php Artisan Command • 3 weeks ago

@snapey have u ever tried to set up ssh acces in ur shared hosting and run commands there?

alihuseyin left a reply on Shared Hosting Run Php Artisan Command • 3 weeks ago

@ralphmorris I cant see it now. I will ask my shared hosting firm for it. Do we have another way?

alihuseyin started a new conversation Shared Hosting Run Php Artisan Command • 3 weeks ago

Hello, I upload my laravel project to a shared hosting and I wonder if I can run php artisan commands from local? Or what is the easiest way of running those commands in shared hosting?

29th December, 2017

alihuseyin started a new conversation Parse Error: Syntax Error, Unexpected '?' In /home/u7461158/sitename.com/lara/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php On Line 233 • 3 weeks ago

I just installed my laravel website to host and I got this error : Parse error: syntax error, unexpected '?' in /home/u7461158/sitename.com/lara/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php on line 233

As I search some people say that It is because of php version but I don't know what to do. Can anyone help me?

25th December, 2017

alihuseyin started a new conversation Where Are Functions Of RegisterController • 4 weeks ago

when I run "php artisan route:list" command it shows me that ... App\Http\Controllers\Auth\[email protected] ...

but RegisterController doesnt have this "showRegistrationForm" Why is that?

24th December, 2017

alihuseyin started a new conversation Blueprint Morphs() Define Primary Key • 4 weeks ago

My schema

...
        $table->morphs('commentable');
            $table->unsignedInteger('user_id')->index();
            $table->index('commentable_id');
            $table->index('commentable_type');
...

I want a user to comment just once and I am trying this

$table->primary(['user_id','commentable_id']);

but I get an error which tells me that "dublicated column 'commentable_id' "

What should I do in this case?

12th December, 2017

alihuseyin left a reply on Htmlspecialchars() Expects Parameter 1 To Be String, Array Given • 1 month ago

@ I was trying something different but now I realized it doesnt make any sense.

alihuseyin left a reply on Htmlspecialchars() Expects Parameter 1 To Be String, Array Given • 1 month ago

@snapey I am new to php and laravel and I dont know where I should execute it at. Basicly I am trying to do some basic stuffs behind page

alihuseyin started a new conversation Htmlspecialchars() Expects Parameter 1 To Be String, Array Given • 1 month ago

{{ $pieces = explode(" ", "piece1 piece2 piece3") }}

I get this error "htmlspecialchars() expects parameter 1 to be string, array given" when I try to execute this line. Wht is that?

alihuseyin left a reply on Send Data Via Href • 1 month ago

@topvillas can you deatil it?

alihuseyin left a reply on Send Data Via Href • 1 month ago

@rumm.an lets say category id 1, so what is the dependence?

alihuseyin left a reply on Send Data Via Href • 1 month ago

@Mo7sin many to many relationship

alihuseyin started a new conversation Send Data Via Href • 1 month ago

I want to send category_id to firm's link

category_id =1 ;
<a href="{{$kurum->url}}" class="href">{!! $kurum->ad !!}</a> //send category_id here

A firm may have many categories and I want to know whic category this firm belongs to

11th December, 2017

alihuseyin left a reply on Getting Data Of One To Many, Which Gets From Many To Many Releationship • 1 month ago

@RiccardoGaleazzi I have categories and sub categories that have many firms. For example

I click "courses" categories and then I click music courses

and it lists me all mucis courses I have and I want to show cities where those courses are located at.

so showing all cities doesnt make sense in that case

10th December, 2017

alihuseyin left a reply on Getting Data Of One To Many, Which Gets From Many To Many Releationship • 1 month ago

@RiccardoGaleazzi lol yes you should xD and the way in your answer takes a lot time because in a one category I have about 60. 000 firms and that loop will take a lot time

alihuseyin started a new conversation Getting Data Of One To Many, Which Gets From Many To Many Releationship • 1 month ago

Hello, I asked a question yesterday and i got an answer now I am stuck again.

My Category model

class Category extends Model
{
    //somethings here
    public function firms()
    {
        return $this->belongsToMany('App\Firm');
    }
}

My Firm model

class Firm extends Model
{
    //somethings here


    public function categories()
    {
        return $this->belongsToMany('App\Category');
    }
    
    public function city()
     {
    return $this->belongsTo('App\City');
     }  
}

and City model

Class City extends Model
{
    //somethings here

    public funcion firms()
    {
        return $this->hasMany('App\Firm');
    }
}

I get some firms by this way and it works well (I got this as an answer yesterday)

$category = 1;
$city = 1;

$firms = Firm::where('city_id', $city)->whereHas('category', function($q) use($category){
    $q->where('id', $category);
})->get();

now I am trying to get cities of that firms I get above but I fail. Can you help me?

9th December, 2017

alihuseyin left a reply on Many To Many Works Slow • 1 month ago

@RiccardoGaleazzi I appreciate your help very much. thank you.

alihuseyin left a reply on Many To Many Works Slow • 1 month ago

@RiccardoGaleazzi I am getting this error "strpos() expects parameter 1 to be string, array given" after trying to execute your updated code, I guess it is about whereHas

alihuseyin left a reply on Many To Many Works Slow • 1 month ago

@RiccardoGaleazzi that $firms returns a category instead firms

alihuseyin left a reply on Many To Many Works Slow • 1 month ago

@RiccardoGaleazzi Thanks for your answer. I have another question if you don't mind.

I am trying to get firms that located in a one city, and this also works slow.

$firms = Category::find(1)->firms()->get()->whereIn('city_id',4); //ids are just an example

----
// firms table includes city_id column 

Any better way to suggest?

alihuseyin left a reply on Many To Many Works Slow • 1 month ago

@Cronix I am not familar with indexing and the table is not stabil. I add new colums sometimes and my table is just like

category_id, firm_id 1 2 1 3 3 2 ...

alihuseyin started a new conversation Many To Many Works Slow • 1 month ago

My Category model

class Category extends Model
{
    //somethings here
    public function firms()
    {
        return $this->belongsToMany('App\Firm',');
    }
}

My Firm model

class Firm extends Model
{
    //somethings here


    public function categories()
    {
        return $this->belongsToMany('App\Category');
    }
}

and I have a pivot table

category_id, 
firm_id

I am trying to brings categories which have firms

and this is my code to show categories

@foreach($categories as $category)
    @if(category->firms->isEmpty()) // works slow
         <a href="/list/{{$category->slug}}" class="href">{{$category->name}}</a>
    @endif
@endforeach 

now one category has about 60000 firms and while checking this category code works really slow. Many to many is that really slow or something with wrong with my code?

8th December, 2017

alihuseyin left a reply on One To Many Relationship • 1 month ago

@mcangueiro It is what I meant in the first example, I need all related workers and in this case some companies may have same workers.

alihuseyin started a new conversation One To Many Relationship • 1 month ago

Normaly in one to many reletionship we can get all workers of one company ''' $workers = Company->workers() ''' But I want to get all workers of some companies . ''' $workers = Companies->workers() ''' Can I do this?

6th December, 2017

alihuseyin started a new conversation Laravel How To Pass Variable From Select Box To Url? • 1 month ago

What I am trying to do is basicly passing selected item's slug from a select box to route

{{ Form::open(['route' => 'list/{category->slug(here)}' ]) }} @foreach($categories $category) {{$category->name}} @endforeach {{ Form::submit('Send') }} {{ Form::close() }}

Can anyone help me?

Edit Your Profile
Update

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