alihuseyin

Experience

2,260

0 Best Reply Awards

  • Member Since 7 Months Ago
  • 4 Lessons Completed
  • 0 Favorites

5th March, 2018

alihuseyin left a reply on Converting Decimal To Asciii • 4 months ago

@Cronix html_entity_decode() functions isnt for php? it does not work in javascript

alihuseyin left a reply on Converting Decimal To Asciii • 4 months ago

@Cronix word looks like the same "arısı"

alihuseyin left a reply on Converting Decimal To Asciii • 4 months ago

@Cronix Thanks for your answer but it did not work.

alihuseyin started a new conversation Converting Decimal To Asciii • 4 months ago

Hello,

Laravel automaticly converts

bal arısı to balarısı

but in javascript it doesnt. there is any function that i can use?

24th February, 2018

alihuseyin started a new conversation Error: Integrity Constraint Violation: 1451 Cannot Delete Or Update A Parent Row • 4 months ago

Hello, I am trying to delete a row but i fail. Error message:

SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (`learnfrombasic`.`words`, CONSTRAINT `words_root_word_id_foreign` FOREIGN KEY (`root_word_id`) REFERENCES `root_words` (`id`)) (SQL: delete from `root_words` where `id` = 144)

words table:

$table->increments('id');
$table->unsignedInteger('root_word_id');
$table->foreign('root_word_id')
                ->references('id')
                ->on('root_words')
                ->onDelete('cascade');

root_word table :

 $table->increments('id');
$table->string('word');

I can't delete any row from root_word table although i defined onDelete('cascade'), why is that?

21st February, 2018

alihuseyin started a new conversation Post Route For Multiple Setting • 5 months ago

I am asking if i made it in a right way? My route:

Route::get('profile/settings/{type}', '[email protected]')->name('profile.settings');
Route::post('profile/settings/{type}', '[email protected]')->name('profile.settings');
``
Profile setting view:

Account Profile Password


one example  for password change : 
//... ```

is this the right way or can you suggest me another option which is more easy?

alihuseyin left a reply on An Advice About Text To Speech • 5 months ago

no suggestion?

18th February, 2018

alihuseyin started a new conversation An Advice About Text To Speech • 5 months ago

Helleo, İ have seen some packages here https://packagist.org/search/?q=speeches but i dont know wich one to use also i could not find a clear example about first 3 of them.

Can you suggest me an easy way to convert text to speach (in many languages)? I found js example that use google api but i guess it doesnt work anymore.

15th February, 2018

alihuseyin left a reply on Save Eloquent In Javasctipt • 5 months ago

@topvillas or can i use ajax?

alihuseyin started a new conversation Save Eloquent In Javasctipt • 5 months ago

Hi, i am trying to save eloquent model in javasctipt and doing something like that

<script>
//
some funct'on(){
{{$grade = new \App\Grade()}}
            {{$grade->user_id = \Auth::user()->id}}
{{ \Auth::user()->grades->save()}}
}
</script>

but this seems messy and can anyone suggest me a better way?

10th February, 2018

alihuseyin started a new conversation Add A Page To End Of The Paginator By Skip Button? • 5 months ago

Hello, i am trying to make a quiz app but i want to let users skip any question and when the question is skipped i want it to be added and of the questions. It is not exact quiz it is more like teaching app. Can i do this with paginator or i should use ajax or something else with more complex logic?

7th February, 2018

alihuseyin started a new conversation Javascript Or Any Other Way To Increase A Value In A Database Table? • 5 months ago

Hello, I want to increase last_page value in my database table when i click next button and i am asking if i should do this by javascript or by any other way ?

5th February, 2018

alihuseyin left a reply on Laravel Ajax Pagination • 5 months ago

@m-rk , Thanks for your answer, Maybe i am doing wrong from the begging so there is a good question from you - why?- I am doing something like a quiz system so i dont want usuers to change url, they will only see next question (or anything). Maybe i should not use pagination system?

alihuseyin started a new conversation Laravel Ajax Pagination • 5 months ago

Hello, I dont know about ajax, just started today. I tried this example https://hdtuto.com/article/laravel-55-ajax-pagination-example and it works fine but i want to a fixed url that does not include pagination numbers. eg:

mtsite.com/categories?page=4  // i dont want this 
mtsite.com/categories         // i want this

Can you suggest me any way or tutorial?

3rd February, 2018

alihuseyin started a new conversation Do I Really Need This Code "npm Install Bootstrap" • 5 months ago

I want to use boostrap 4 and as i read i need to instal it and configure some stuffs. It may be foolish question but cant i just use

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">

30th January, 2018

alihuseyin started a new conversation Relationship Between Paginator() And $item->links('simple-boostrap-4') ? • 5 months ago

Hello I want to edit next and previous items and i am using simple-boostrap-4.blade.php

what simple-boostrap-4.blade.php has is

@if ($paginator->hasPages())
    <ul class="text-center">
        {{-- Previous Page Link --}}
        @if ($paginator->onFirstPage())
            <li class="page-item disabled"><span class="left">PREVIOUS</span></li>
        @else
            <li class="page-item"><a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev">PREVIOUS</a></li>
        @endif

        {{-- Next Page Link --}}
        @if ($paginator->hasMorePages())
            <li class="page-item"><a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next">NEXT</a></li>
        @else
            <li class="page-item disabled"><span class="page-link">NEXT</span></li>
        @endif
    </ul>
@endif

but i want to do something like that in my view (dont wanna use item->links())

 <div class="row">>
            <div class="col-sm-1" >


                @if (paginator()->hasPages())
                    <ul class="text-center">
                        {{-- Previous Page Link --}}
                        @if ($category->links()->onFirstPage())
                            <li class="page-item disabled"><span class="left">PREVIOUS</span></li>
                        @else
                            <li class="page-item"><a class="page-link" href="{{ $category->links()->previousPageUrl() }}" rel="prev">PREVIOUS</a></li>
                        @endif
                    </ul>
                @endif
            </div>
            @foreach($category as $item)
                <div class="col-sm-10" >

                   //content

                </div>
            @endforeach
            <div class="col-sm-1" >
                @if (paginator->hasPages())
                    <ul class="text-center">
                        {{-- Next Page Link --}}
                        @if ($category->links()->hasMorePages())
                            <li class="page-item"><a class="page-link" href="{{ $category->links()->nextPageUrl() }}" rel="next">NEXT</a></li>
                        @else
                            <li class="page-item disabled"><span class="page-link">NEXT</span></li>
                        @endif
                    </ul>
                @endif
            </div>
        </div>

and as you can guess "paginator" has not defined in this view. My question is that how can i use paginator() in my view ?

29th January, 2018

alihuseyin started a new conversation Can We Call Factory From A Controller? • 5 months ago

Hello, I want to create fake user for people who doent want to create a user, and i want to call factory from my register controller. Is it possible?

28th January, 2018

alihuseyin left a reply on Get Specific Field From A Uri Like Register?learn=en • 5 months ago

@topvillas for now I use url()->full() method and edit it to get locale but i dont know what you mean, can you give me an example?

alihuseyin started a new conversation Get Specific Field From A Uri Like Register?learn=en • 5 months ago

Hello if i define a route like this

Route::get(/register/{language},'callbackmethod')

it is easy to get language from uri but i want to get language from this one

mysite.com/register?learn=en 

What can i do to achive this?

alihuseyin left a reply on How To Prevent Entering Url For Post Methods? • 5 months ago

@Snapey Thx. I have solved it by adding this in handler.php

if($exception instanceof \Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException){
            return redirect('/');
        }

alihuseyin started a new conversation How To Prevent Entering Url For Post Methods? • 5 months ago

Hello, I want redirect back for users who enter a url for a post.

lets say i have a route

"Route:post('/postmethod-uri','[email protected]')"

if i enter this url "mywebsite.com/postmethod-uri" I get an error

Symfony \ Component \ HttpKernel \ Exception \ MethodNotAllowedHttpException

How can i solve this?

27th January, 2018

alihuseyin started a new conversation Column Name With + • 5 months ago

I have a column named "google+" and when i try to call it from blade it gives an error naturaly ($user->google+) Should i change the column name to google_plus or do i have any other option?

23rd January, 2018

alihuseyin left a reply on When Validation Fail It Returns Back Automaticly • 5 months ago

@Snapey bec it returns back to top of the page, but i want it to returns back to spesicif field like /#contact

alihuseyin started a new conversation When Validation Fail It Returns Back Automaticly • 5 months ago

$result = $this->validate($request,
            [
                'name' => 'required',
                'email' => 'required|email',
                'message' => 'required|min:5'
            ]);    // if it fails, it returns back here




// i want this field to work
        if ($result -> fails())
        {
            dd($result); 
            return back() -> withInput() -> withErrors($result);
        }

I dont want it to return back automaticly, any help?

20th January, 2018

alihuseyin left a reply on Apache Setup Domain Name (failed) • 6 months 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) • 6 months 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) • 6 months 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) • 6 months 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) • 6 months 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? • 6 months 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 • 6 months ago

@tykus yes I restarted it from vesta panel

alihuseyin left a reply on (laravel Project On Server) HTTP ERROR 500 • 6 months 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 • 6 months 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 • 6 months 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 • 6 months 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 • 6 months ago

@wilburpowery xcloud server

alihuseyin started a new conversation (laravel Project On Server) HTTP ERROR 500 • 6 months 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 • 6 months 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 • 6 months 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 • 6 months 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 • 6 months 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 • 6 months 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 • 6 months 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 • 6 months 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 • 6 months 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 • 6 months 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 • 6 months 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 • 7 months 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 • 7 months 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

Edit Your Profile
Update

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