BeginnerSoul

Member Since 1 Year Ago

Experience Points
3,810
Total
Experience

1,190 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
16
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start your engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    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 Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

  • Community Pillar

    Earned once your experience points ranks in the top 10 of all Laracasts users.

Level 1
3,810 XP
Apr
04
1 week ago
Activity icon

Replied to Update Json Value

Ok, it seems in the fillable field, I need to put the json keys too and not just the main database field name which in this case meta. Thank you for the help. :)

Activity icon

Replied to Update Json Value

It works and same time it doesn't.

If I remove the "wants_newsletter" part and just "meta" is there then it will work. If I put 'meta->wants_newsletter' then nothing happens in the database.

Hmm I have casts too which looks like this:

protected $casts = [
        'meta' => 'array',
    ];

I don't know if it does matter something.

Activity icon

Started a new Conversation Update Json Value

Hello I am trying to save in one field the data as json format so no need to have for every single details separated fields. I did find on the google this method:

DB::table('contacts')
    ->where('id', 1)
    ->update(['meta->wants_newsletter' => false]);

However it was 2016 method. Is there a solution with eloquent?

I am asking eloquent because I did read many places that way the queries are safer and faster but direct DB::table will be more raw query which would be not safe.

Mar
31
1 week ago
Activity icon

Replied to Get Location With Coordinates Without Google

Thank you for the answer. :) I will look around there then.

Activity icon

Started a new Conversation Get Location With Coordinates Without Google

Hello Does someone know a package or something which would give the location if the coordinates are given? I just need the country and city to get. I wouldn't use Google service for this because over time it would cost a lot. Is there an OpenStreetMap method or something else which wouldn't cost?

Maybe I have stup*d question but hopefully there is an answer. Thanks in advance the answers.

Mar
26
2 weeks ago
Activity icon

Replied to Jetstream Add Team Member Permission

Hmm strange. Originally the team-member-manager.blade.php has this:

Gate::check('addTeamMember', $team)

And it doesn't work. So I changed to:

Auth::user()->hasTeamPermission($team, 'addTeamMember')

Well the result is important. Hopefully it helps others too if someone has similar problem.

Activity icon

Started a new Conversation Jetstream Add Team Member Permission

Hello I tried to add the "addTeamMember" permission because I saw in the blade file that needs if the member wants to invite new people. I added to the editor role for testing and it didn't work. I can't add new people to the team with the test account. It is same if I add the test account as administrator. I can't invite either way new people to the team. What can be the problem?

In the JetstreamServiceProvider.php:

protected function configurePermissions()
    {
        Jetstream::defaultApiTokenPermissions(['read']);

        Jetstream::role('admin', __('Administrator'), [
            'read',
            'create',
            'delete',
            'update',
            'addTeamMember',
        ])->description(__('Admin can perform any action.'));

        Jetstream::role('editor', __('Editor'), [
            'read',
            'create',
            'addTeamMember',
            'update',
        ])->description(__('Editor users have the ability to read, create, and update.'));
    }
Activity icon

Replied to Jetstream Routes

Yeah, I did use the php artisan optimize and php artisan route:clear too.

Update: In the end I did include in the web.php file the jetstream.php. What I mean:

require_once __DIR__ . '/jetstream.php';

And then in the JetstreamServiceProvider.php I did use in the register function:

Jetstream::ignoreRoutes();

This way works if I edit in the routes folder the jetstream.php file.

Mar
25
2 weeks ago
Activity icon

Started a new Conversation Jetstream Routes

Hello I am trying to disable only the team create route and I did publish the jetstream routes file with this command:

php artisan vendor:publish --tag="jetstream-routes"

The command did copy the jetstream.php file to the routes folder. So far everything goes fine. When I will comment this or delete from the php file then nothing happens:

Route::get('/teams/create', [TeamController::class, 'create'])->name('teams.create');

The website doesn't give me 404 error page. Whatever I modify in the jetstream.php file nothing is valid. Do I miss something?

Mar
24
2 weeks ago
Activity icon

Replied to Jetstream Selected Team

Ok I found. If someone else has this idea as me then they can go to the jetstream folder and search to "TeamInvitationController.php" and add this to the accept function:

$team = Jetstream::newTeamModel()->findOrFail($invitation->team->id);

        if (! $request->user()->switchTeam($team)) {
            abort(403);
        }

So whole php file will be like this:

<?php

namespace Laravel\Jetstream\Http\Controllers;

use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Http\Request;
use Illuminate\Routing\Controller;
use Illuminate\Support\Facades\Gate;
use Laravel\Jetstream\Contracts\AddsTeamMembers;
use Laravel\Jetstream\Jetstream;
use Laravel\Jetstream\TeamInvitation;

class TeamInvitationController extends Controller
{
    /**
     * Accept a team invitation.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Laravel\Jetstream\TeamInvitation  $invitation
     * @return \Illuminate\Http\RedirectResponse
     */
    public function accept(Request $request, TeamInvitation $invitation)
    {
        app(AddsTeamMembers::class)->add(
            $invitation->team->owner,
            $invitation->team,
            $invitation->email,
            $invitation->role
        );

        $team = Jetstream::newTeamModel()->findOrFail($invitation->team->id);

        if (! $request->user()->switchTeam($team)) {
            abort(403);
        }

        $invitation->delete();

        return redirect(config('fortify.home'))->banner(
            __('Great! You have accepted the invitation to join the :team team.', ['team' => $invitation->team->name]),
        );
    }

    /**
     * Cancel the given team invitation.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Laravel\Jetstream\TeamInvitation  $invitation
     * @return \Illuminate\Http\RedirectResponse
     */
    public function destroy(Request $request, TeamInvitation $invitation)
    {
        if (! Gate::forUser($request->user())->check('removeTeamMember', $invitation->team)) {
            throw new AuthorizationException;
        }

        $invitation->delete();

        return back(303);
    }
}

Activity icon

Started a new Conversation Jetstream Selected Team

Hello How can I make that if someone is accepting the invitation then for the invited person will be automatically will be selected the team where were invited?

For example I invite xy person then the xy person will accepting and after accept the website would select the invited team automatically. I tried to check with Actions but hmm I don't have any idea.

Mar
23
2 weeks ago
Activity icon

Started a new Conversation Jetstream Reset Password

Hello I am trying to find the reset password controller/livewire part but I didn't find yet. I would like to use the reset password functions but with different email text. I have the normal reset password page. I would like to have in admin panel too but with different email title and body text. The main problem I don't find how the reset password part works.

I found only this: https://github.com/laravel/jetstream/blob/11a0fa207f08b8d1bcd9b92605deef63ccf0425e/stubs/tests/PasswordResetTest.php

But I don't find the ResetPassword::class or I don't know where I should find.

Mar
21
3 weeks ago
Activity icon

Replied to List Team Members

Alright, in the end I did this way:

  • I did separate ownedTeams and teams to different variables
  • I do start check if the ownedTeams exists for the member
  • I do start check if the member is joined to other teams
  • After I foreach the ownedTeams's allUsers() and then checking if the Auth ID is not equal with the ownedTeams user id. Same doing with the "teams" function.
  • If there is no users in the team then a message appears with "The team doesn't have other members"

I used eventually the functions which are in the documentation. So I didn't write extra functions. Now it works fine. :)

Activity icon

Replied to List Team Members

Alright. Thank you for the answer. I will try my best then. I will be back with the feedback if I did success.

Activity icon

Started a new Conversation List Team Members

Hello I am trying to list all of the members who are in the specific team but I don't find solution. I did check this page: https://jetstream.laravel.com/2.x/features/teams.html and I tried to first get the currentteam, which works fine and then no idea with what I should check.

What I mean for example: 1.) 2 people have their own team right. Xy people for example Richard and Adam. 2.) Adam invites Richard to his team.

I am trying to make a profile page where the team would be listed. However I don't find a function or I am blind which would check Richard is in Adam's team so on his profile appearing Adam's team members.

Is there such function or I should write alone? I tried with currentteam, allteams and ownedteams however I am confused how to connect things to each other with the current functions.

Mar
20
3 weeks ago
Activity icon

Started a new Conversation Cache Security Opinion

Hello Nowadays can read that from cache data can be hacked important information about the website and its user. Big companies did such mistake to store important messages to make faster the requests and the hackers were able to collect the data.

I see laravel supports different drivers to use the cache function. Default is "file". Now the question is that if the "file" drive is enough from security viewpoint or I should start directly with "database" driver instead? The data would remain 1 minute. I am sure people would suggest to use Redis, APC or memcached however I don't have such luxury for now. Later I will upgrade the options. From performance side the file would be faster than database but I don't know from security side how secured would be. Performance side, I did read here: https://www.georgebuckingham.com/laravel-cache-driver-performance/ Which is the best option in the beginning file or database? Thank you in advance the answers.

Mar
16
3 weeks ago
Activity icon

Replied to Post Form Problem

Wow, I found. The form has problem with this part:

<input hidden type="text" id="IconInput" name="Icon" required placeholder="Hidden etc. input for icon classname" autocomplete="off" spellcheck="false" />

No idea why. By the way thanks for the answers everybody.

Activity icon

Replied to Post Form Problem

With web.php works if I reach direct link but somehow the send button doesn't react. Hmm I need to do more research what can be the problem. I don't think javascript problem or similar. Maybe something about tailwind...

Activity icon

Replied to Post Form Problem

Hmm I am using the default Api.php file which had this:

Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
    return $request->user();
});

And after I went to the https://family.test/api/user and I see in the telescope the website is trying to redirect me to the login page. Hmm as if I am not logged in according to the laravel but I am logged in. I am using jetstream btw.

PS: It seems I did misunderstood. Now I get it for what is api.php. I thought that it will be more secure to use but not everytime it seems so.

Activity icon

Started a new Conversation Post Form Problem

Hello I don't know but I have problem to use the api.php somehow. Maybe I am not good with this or I don't know.

My controller code:

<?php

namespace App\Http\Controllers\ApiControllers\ParentalCPControllers\Admin;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;

class MenuManagerApi extends Controller
{
    public function addmenu(Request $request){

        dd($request->all());

    }
}

Api.php code:

<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::namespace('App\Http\Controllers\ApiControllers\ParentalCPControllers\Admin')->group(function () {
    Route::group(['domain' => 'family.test', 'prefix' => 'admin', 'as' => 'admin.', 'middleware' => ['setTheme:family.test', 'auth']], function () {
        Route::get('/addmenu', '[email protected]')->name('familyapi_admin_menumanager_addmenu');
    });
});
<form action="{{ route('admin.familyapi_admin_menumanager_addmenu') }}" method="get">
        @csrf
        <div class="flex flex-wrap ">
            <div class="md:w-1/2 pr-4 pl-4">
                <label for="">Name</label>
                <input type="text" name="name" id="name" class="block appearance-none w-full py-1 px-2 mb-1 text-base leading-normal bg-white text-gray-800 border border-gray-200 rounded" onkeydown="slugify(this.value, '#slug')" value="" >
                @if($errors->has('name'))
                    <div class="error">{{ $errors->first('name') }}</div>
                @endif
            </div>
            <div class="md:w-1/2 pr-4 pl-4">
                <label for="">Slug</label>
                <input type="text" name="slug" id="slug" class="block appearance-none w-full py-1 px-2 mb-1 text-base leading-normal bg-white text-gray-800 border border-gray-200 rounded" value="" >
            </div>
        </div>

        <br>

        <div class="flex flex-wrap ">
            <div class="md:w-1/2 pr-4 pl-4">
                <label for="">Menu type</label>
                <select name="menu_type" id="menu_type" class="block appearance-none w-full py-1 px-2 mb-1 text-base leading-normal bg-white text-gray-800 border border-gray-200 rounded">
                    @foreach($menutypes as $menutype)
                        {{ $loop->first ? 'selected="selected"' : '' }}
                        <option value="{{ $menutype }}">{{ $menutype }}</option>
                    @endforeach

                </select>
            </div>
            <div class="md:w-1/2 pr-4 pl-4">
                <label for="">Menu side</label>
                <select name="menu_side" id="menu_side" class="block appearance-none w-full py-1 px-2 mb-1 text-base leading-normal bg-white text-gray-800 border border-gray-200 rounded">
                    @foreach($menusides as $menuside)
                        {{ $loop->first ? 'selected="selected"' : '' }}
                        <option value="{{ $menuside }}">{{ $menuside }}</option>
                    @endforeach
                </select>
            </div>
        </div>

        <br>

        <div class="flex flex-wrap">
            <div class="md:w-1/3 pr-4 pl-4">
                <label for="">Parent menu</label>
                <select name="parent_id" id="parent_id" class="block appearance-none w-full py-1 px-2 mb-1 text-base leading-normal bg-white text-gray-800 border border-gray-200 rounded">
                   <option value="nothing">No parent</option>
                    @foreach($menutypes as $menutype)
                        <optgroup label="{{ $menutype }}">
                        @foreach($menus as $menu)
                            @if($menutype == $menu->menu_type)
                                <option value="{{ $menu->id }}">{{ $menu->title }}</option>
                            @endif
                        @endforeach
                        </optgroup>
                    @endforeach

                </select>
            </div>
            <div class="md:w-1/3 pr-4 pl-4">
                <label for="">Position</label>
                <input type="number" name="position" id="position" class="block appearance-none w-full py-1 px-2 mb-1 text-base leading-normal bg-white text-gray-800 border border-gray-200 rounded" value="0">
            </div>
            <div class="md:w-1/3 pr-4 pl-4">
                <label for="">Icon</label>
                <div class="get-and-preview">
                    <div class="icon-preview" data-toggle="tooltip" title="Preview of selected Icon">
                        <i id="IconPreview" class=""></i>
                    </div>

                    <button type="button" id="GetIconPicker" data-iconpicker-input="input#IconInput" data-iconpicker-preview="i#IconPreview">Select Icon</button>
                </div>
                <input hidden type="text" id="IconInput" name="Icon" required placeholder="Hidden etc. input for icon classname" autocomplete="off" spellcheck="false" />
            </div>
        </div>

        <br>

        <div class="flex flex-wrap ">
            <div class="md:w-1/2 pr-4 pl-4">
                <button type="submit" class="inline-block align-middle text-center select-none border font-normal whitespace-no-wrap rounded py-1 px-3 leading-normal no-underline bg-green-500 text-white hover:bg-green-600">Save</button>
            </div>
        </div>

    </form>

The problem is that nothing happens when I click to the save button. I don't even see in the network tab that the request is sent. I tried to reach directly the api https://family.test/api/admin/addmenu and then giving parameters https://family.test/api/admin/addmenu?title=blablabla and it redirects me to the main page.

I get from telescope the 302 error code: Image

(I am using GET method just for testing. Planning to use POST) What I am doing wrong?

Activity icon

Replied to Multilevel Drag And Drop Menu

In the end, I use https://github.com/RamonSmit/Nestable2 . Thanks for the all answers. :)

Mar
12
4 weeks ago
Activity icon

Replied to Multilevel Drag And Drop Menu

I did find in vue but not in livewire. I would like to have in livewire. I didn't find any in livewire version.

Activity icon

Started a new Conversation Multilevel Drag And Drop Menu

Hello I am trying to make an admin panel to my website and I am trying to manage the website menus easily by just drag and drop them if I need to reorder. However I have multi level menu, which is main menu and a submenu and the submenu possible will have more submenus and so on. The question is how I can make such thing to drag and drop something like wordpress has but in livewire. I would like to do without package so I will not need to be afraid to stop updating the laravel.

I checked this video: https://laravel-livewire.com/screencasts/s8-dragging-list and I understood the concept however it doesn't show the multi level item drag and drop method so I stuck now.

Thank you for the answers in advance.

Mar
10
1 month ago
Activity icon

Replied to Registered Users In The Current Month

You are my hero. Thank you very much. It works. :)

Activity icon

Started a new Conversation Registered Users In The Current Month

Hi, I am so so so confused. I found many charts library, tutorials and so on but I can't do to work this what I want. I am trying to make an admin panel and in the dashboard I just show the current month's new registered users statistic. It wouldn't be problem however I want that way to list all of the day and even if nobody is registered in one day then it would be showed on the chart as 0 value or something.

How can I make the chart to list first all of the days in the current month and then fill with data from the database? I am using the latest version of the laravel and the old packages don't work for me.

Mar
07
1 month ago
Activity icon

Replied to Storage Link With Multiple Links

Update: Ok, I fixed the problem by updating the laravel. It seems I had the laravel v8.29.0 and updated to v8.31.0. Sorry for opening for this a threat.

Activity icon

Started a new Conversation Storage Link With Multiple Links

Hello I am trying to give more than 1 storage link because I am using laravel as a core for my different subdomains and main domain while using a github extension which allows me to use multi domains.

So the problem is that I am put in the filesystems.php config file this line:

/*
    |--------------------------------------------------------------------------
    | Symbolic Links
    |--------------------------------------------------------------------------
    |
    | Here you may configure the symbolic links that will be created when the
    | `storage:link` Artisan command is executed. The array keys should be
    | the locations of the links and the values should be their targets.
    |
    */

    'links' => [
        public_path('storage') => storage_path('app/public'),
        public_path('storage_subdomain') => storage_path('subdomain/app/public'),
    ],

And then I run the php artisan storage:link command but the second line doesn't executed which is subdomain, just the first line executed. What I can do?

Mar
04
1 month ago
Activity icon

Replied to Defined Namespace In The Route Group

I am using the latest version of the laravel and I thought just with ::class can use the controller so therefore I used that way. With that extension which I showed in the first message github, helps me to have different domains in the same laravel core because many webhostings have inode limitation and therefore I am trying to save some inode.

However both sites have the "Admin" folder and DashboardController.php. When I will have opportunity to separate the both sites then I will not need to rename everytime.

So the main page namespace is

namespace App\Http\Controllers\MainPage\Admin;

Subdomain controller:

namespace App\Http\Controllers\Family\Admin;

Therefore I am trying to put in the route group for one site the namespace and another the other namespace so I will not need to give the full namespace in the get and post requests.

Activity icon

Started a new Conversation Defined Namespace In The Route Group

Hello I am trying to define the namespace in the rout group but it doesn't recognize the namespace.

I have the namespace to the controller:

namespace App\Http\Controllers\Family\Admin;

And my route group is like this:

Route::group(['namespace' => 'App\Http\Controllers\Family', 'domain' => 'family.page.test', 'prefix' => 'Admin', 'as' => 'Admin.', 'middleware' => ['auth']], function () {
    Route::get('/', [DashboardController::class, 'index'])->name('dashboard_family');
});

I am using this for multi domain: https://github.com/gecche/laravel-multidomain

I get this error:

Target class [DashboardController] does not exist.

What I am doing wrong?

Feb
25
1 month ago
Activity icon

Started a new Conversation Jetstream Terms And Privacy Problem

Hello I am trying to following this https://jetstream.laravel.com/2.x/features/registration.html and I am at this part:

use Laravel\Fortify\Features;

'features' => [
    Features::termsAndPrivacyPolicy(),
    // Features::profilePhotos(),
    // Features::api(),
    // Features::teams(),
    Features::accountDeletion(),
],

When I am using that then I get this error message:

Call to undefined method Laravel\Jetstream\Features::termsAndPrivacyPolicy()

How can I enable if it doesn't exists? It is same with Features::accountDeletion() too.

Jan
13
2 months ago
Activity icon

Started a new Conversation Selected Option Value

Hello How can I get the selected option value?

I foreach from the database to a list and I am trying to get the selected option value and save in the database:

<select name="priority_id" id="priority" class="form-control select2" required>
        @foreach($priorities as $id => $priority)
            <option value="{{ $id }}" {{ (isset($ticket) && $ticket->priority ? $ticket->priority->id : old('priority_id')) == $id ? 'selected' : '' }}>{{ $priority }}</option>
        @endforeach
    </select>

How can I do?

Jan
07
3 months ago
Activity icon

Replied to Prevent Random String Id To Be Same

Thank you for the answers. I will try now all of them.

Jan
05
3 months ago
Activity icon

Started a new Conversation Prevent Random String Id To Be Same

Hello I am trying to make a ticket system and I am little confused. The code is when someone sending a ticket:

$ticket = new Ticket([
            'title'     => $request->input('title'),
            'user_id'   => Auth::user()->id,
            'ticket_id' => strtoupper(str_random(10)),
            'category_id'  => $request->input('category'),
            'priority'  => $request->input('priority'),
            'message'   => $request->input('message'),
            'status'    => "Open",
        ]);

However I am not sure about the ticket_id field. I am scared that part can be same as the old records in the database. The migration to that field is:

Schema::create('tickets', function (Blueprint $table) {
    $table->increments('id');
    $table->integer('user_id')->unsigned();
    $table->integer('category_id')->unsigned();
    $table->string('ticket_id')->unique();
    $table->string('title');
    $table->string('priority');
    $table->text('message');
    $table->string('status');
    $table->timestamps();
});

Yeah the column is unique and it will be not duplicated however what if the "strtoupper(str_random(10))" code will generate the same ticket_id which already exists? I think that I will get an error but how I keep generate a new ticket_id until that doesn't exists in the database?

I thought about

$code = strtoupper(str_random(10));
$something = Ticket::where('ticket_id', '=', $code)->get();

if($something)
{
     $code = strtoupper(str_random(10));
}

and then put in store function:

$ticket = new Ticket([
            'title'     => $request->input('title'),
            'user_id'   => Auth::user()->id,
            'ticket_id' => $code,
            'category_id'  => $request->input('category'),
            'priority'  => $request->input('priority'),
            'message'   => $request->input('message'),
            'status'    => "Open",
        ]);

However this will check only once. How I can keep trying to generate new ticket_id until it will found not exists id? About ticket ID would look like "Ticket number: # F3248F2". That way would be showed on the website.

Thank you in advance for all of the answers.

Jan
04
3 months ago
Activity icon

Started a new Conversation Prevent Spams

Hello Does somewhere have a method to prevent spams with livewire? If there is any then what you can recommend to prevent spams? I created a contact form and I can spam the send button everytime without limits.

I found this https://github.com/spatie/laravel-honeypot but dunno how to get the error message in livewire if for example a bot spamming and if a real person spamming how to limit the person' to not spam the send button. It would be nice to prevent at backend.

Someone does know the solution to this problem?

Dec
31
3 months ago
Activity icon

Replied to Tinymce With Livewire

It is high level. If you are not using tinymce, then can you recommend something else? I can't find on the google other answers than what I found in the first post. Maybe I should change editor or I don't know. I wanted to stuck with tinymce because it has many functions and free.

Activity icon

Started a new Conversation Tinymce With Livewire

Hello I don't know how to make it possible. Tinymce and livewire together. I found this answer from https://forum.laravel-livewire.com/t/how-to-setup-tinymce-with-livewire/1148/2 but the result is just simple textarea. I don't get the tinymce. I did put this code in the body too:

<script src="{{ asset('vendors/tinymce/tinymce.js') }}"></script>

The web console doesn't give error, so I don't know what can be the problem. How can I put tinymce with livewire and get the tinymce value?

This livewire started to be fun to learn for me but sometimes I stuck with some parts such as this problem. Thanks in advance for the answers.

Activity icon

Replied to JQuery And Bootstrap Missing

Thank you for the answers. Much to learn, indeed. I used long time ago laravel 6 and when I upgraded to laravel 8 then I can start everything from the beginning.

Dec
29
3 months ago
Activity icon

Replied to Error Message In The Blade

I found the problem. In the end I were stupid as usually. I left somewhere else in the listmenu blade a {{ }} tag with blank. I should be more careful but so far Laravel is fun to play. I just developing different stuffs without going to the production phrase but yeah I need to learn much. Thank you for the answering by the way. :)

Activity icon

Started a new Conversation Error Message In The Blade

Hello I had problem with database before and I thought because of the database I get the next error which is: Too few arguments to function e(), 0 passed in

For test I used this code and I get the same error: {{ 1 == 1 ? 'ss' : 'sssss' }}

What is the problem? In the controller I have so:

$projects = Projects::all();
 return view('listmenu', compact('projects'));
Dec
27
3 months ago
Activity icon

Started a new Conversation JQuery And Bootstrap Missing

Hello I don't know how but it is missing in my laravel version bootstrap and jquery. I installed laravel with this command laravel new testporject --jet and then I added custom html and tried to use the css/app.css and js/app.js files in the header after I ran the npm install && npm run dev commands. Was it removed from the laravel version 8.19? Or maybe I am using wrong. I read long time ago that the bootstrap and jquery should be in laravel but don't know in which version.

If they are removed then how can I put in the app.js and app.css?

Dec
21
3 months ago
Dec
20
3 months ago
Activity icon

Replied to Subdomains Use Laravel As Core

Well I don't have vps and can't afford monthy way. Webhosting packages are cheaper and good start of everything and there are inode limits, most of the hostings have. Those who don't have usually have server faults. Other words, I need to use shared webhosting at the start.

I found on the youtube some tutorials which separate databases in .env file but not seeing the subdomain, separated folders to separated domains, and so on.

Activity icon

Started a new Conversation Subdomains Use Laravel As Core

Hello I am so confused nowadays. I am trying to find a solution to use laravel as a core and then all subdomains would have their own view, database, etc. Why I want this? Because many webhosting have inode limitation and I am trying to make less files this way, so I don't need copy+paste laravel everytime and inode limit will be under control. Is there an option to use subdomains and use different databases/views/controllers for different subdomains?

I read something Multi Tenancy, but it is difficult for me to understand plus risk is that if the developers of the multi tenancy will discount one day.