alihuseyin

alihuseyin

Member Since 1 Year Ago

Experience Points 2,310
Experience
Level
Lessons Completed 4
Lessons
Completed
Best Reply Awards 0
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.

05 Mar
10 months ago

alihuseyin left a reply on Converting Decimal To Asciii

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

alihuseyin left a reply on Converting Decimal To Asciii

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

alihuseyin left a reply on Converting Decimal To Asciii

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

alihuseyin started a new conversation Converting Decimal To Asciii

Hello,

Laravel automaticly converts

bal arısı to balarısı

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

24 Feb
10 months ago

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

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?

21 Feb
10 months ago

alihuseyin started a new conversation Post Route For Multiple Setting

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

no suggestion?

18 Feb
10 months ago

alihuseyin started a new conversation An Advice About Text To Speech

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.

15 Feb
11 months ago

alihuseyin left a reply on Save Eloquent In Javasctipt

@topvillas or can i use ajax?

alihuseyin started a new conversation Save Eloquent In Javasctipt

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?

10 Feb
11 months ago

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

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?

07 Feb
11 months ago

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

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 ?

05 Feb
11 months ago

alihuseyin left a reply on Laravel Ajax Pagination

@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

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?

03 Feb
11 months ago

alihuseyin started a new conversation Do I Really Need This Code "npm Install Bootstrap"

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">
30 Jan
11 months ago

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

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 ?

29 Jan
11 months ago

alihuseyin started a new conversation Can We Call Factory From A Controller?

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?

28 Jan
11 months ago

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

@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

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?

@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?

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?

27 Jan
11 months ago

alihuseyin started a new conversation Column Name With +

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?

23 Jan
11 months ago

alihuseyin left a reply on When Validation Fail It Returns Back Automaticly

@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

$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?

20 Jan
11 months ago

alihuseyin left a reply on Apache Setup Domain Name (failed)

@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)

@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)

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 ?

18 Jan
11 months ago

alihuseyin left a reply on 2018- Best Hosting (subjective)

@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)

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?

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?

11 Jan
1 year ago

alihuseyin left a reply on (laravel Project On Server) HTTP ERROR 500

@tykus yes I restarted it from vesta panel

alihuseyin left a reply on (laravel Project On Server) HTTP ERROR 500

@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

@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
10 Jan
1 year ago

alihuseyin left a reply on (laravel Project On Server) HTTP ERROR 500

@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

@tykus yes I have,

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

alihuseyin started a new conversation (laravel Project On Server) HTTP ERROR 500

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?

09 Jan
1 year ago

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

@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

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?

06 Jan
1 year ago

alihuseyin started a new conversation Social Login And Custom Login

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?

30 Dec
1 year ago

alihuseyin left a reply on Shared Hosting Run Php Artisan Command

@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

@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

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?

29 Dec
1 year ago

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

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?

25 Dec
1 year ago

alihuseyin started a new conversation Where Are Functions Of RegisterController

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?

24 Dec
1 year ago

alihuseyin started a new conversation Blueprint Morphs() Define Primary Key

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?

12 Dec
1 year ago

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

@ 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

@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