Tabs

Good evening, i have a question about customizing tabs. I have a relationship between projects and services table. Here is the table.

Project Table
        Schema::create('projects', function (Blueprint $table) {
            $table->uuid('id')->primary();
            $table->uuid('service_id')->nullable();
            $table->string('name');
            $table->string('slug')->unique();
            $table->string('image')->nullable();
            $table->string('description');
            $table->timestamps();
        });

        Schema::table('projects', function (Blueprint $table) {
            $table->foreign('service_id')
                ->references('id')
                ->on('services');
        });

Service Table
        Schema::create('services', function (Blueprint $table) {
            $table->uuid('id')->primary();
            $table->string('name');
            $table->string('slug')->unique()->nullable();
            $table->string('description')->nullable();
            $table->string('icon');
            $table->timestamps();
        });


My goal is to show all projects for each service and the total projects. I managed to implement the tabs but without the total projects of each service.
Was this page helpful?