how to get the record id in lightning component code example
Example: lightning component get current record id
<aura:component implements="force:lightningQuickAction,force:hasRecordId">
<aura:attribute name="recordId" type="String" />
</aura:component>